Append: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
(edit)
 
(edit)
Line 1: Line 1:
To append to the end of a [[String]] you should (for maximum speed of code execution) use  
To append to the end of a [[String]] you should (for maximum speed of code execution) use  


  X$(32767:0)="append this to end"
  X$(inf:0)="append this to end"
 
<br> Please note that [[32,767]] is the [[Maximum]] size of a string in Business Rules! and if that changes at some point than this number must be changed and any existing code that uses this syntax.


Optionally you may choose to use [[Inf]] in your code which may work better with changing maximums. The following method runs just as quickly as the previous.  
Here, [[inf]] denotes '''infinity'''. So '''X$(inf:0)''' means "the substring of X$ starting at infinity". This is particularly useful when you don't know how long your string is and do not want to calculate its length.
 
X$(inf:0)="append this to end"


Another method that is almost as quick is:  
Another method that is almost as quick is:  

Revision as of 13:09, 9 January 2012

To append to the end of a String you should (for maximum speed of code execution) use

X$(inf:0)="append this to end"

Here, inf denotes infinity. So X$(inf:0) means "the substring of X$ starting at infinity". This is particularly useful when you don't know how long your string is and do not want to calculate its length.

Another method that is almost as quick is:

X$(inf:inf)="append this to the end"

or

X$(inf:0)="append this to the end"