Go Back   Wiki NewForum | Latest Entertainment News > Career Forum & Tips > Tech Forum & Tutorial > Oracle Database, SQL, Application, Programming


Resizing huge strings


Reply
Views: 1443  
Thread Tools Rate Thread
  #1  
Old 08-09-2010, 01:10 PM
bholas bholas is offline
Award Winner
 
Join Date: Apr 2010
Posts: 4,977
Default Resizing huge strings

"Huge strings" introduced in Delphi 2.x can adjust their string size on demand. However, if you have a need to preset the size of a huge string, before passing to a function expecting a string buffer of a certain size for example, try the "SetLength()" function:
{ size of the following string is 3 }
{ 3 = two characters plus length or }
{ end-of-string holder }

sHugeString := 'hi';

{ set the size without assigning }

SetLength( sHugeString, 1024 );

{ sHugeString is now 1024 chars long }

Reply With Quote
Reply

Tags
programming tips

New topics in Oracle Database, SQL, Application, Programming





Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
WikiNewForum)