Append: Difference between revisions
Jump to navigation
Jump to search
(edit) |
No edit summary |
||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
To append string2$ to string1$ means to join string2$ to the end of string1$. | |||
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$(inf:0)="append this to end" | X$(inf:0)="append this to end" | ||
OR | |||
X$(inf:inf)="append this to the end" | X$(inf:inf)="append this to the end" | ||
Here, [[inf]] denotes '''infinity'''. | |||
So '''X$(inf:inf)''' 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. | |||
see also: [[prepend]] | |||
<noinclude> | <noinclude> | ||
[[Category: | [[Category:Operations]] | ||
[[Category:String | [[Category:String Operations]] | ||
</noinclude> | </noinclude> |
Latest revision as of 18:23, 13 January 2014
To append string2$ to string1$ means to join string2$ to the end of string1$.
To append to the end of a String you should (for maximum speed of code execution) use
X$(inf:0)="append this to end"
OR
X$(inf:inf)="append this to the end"
Here, inf denotes infinity.
So X$(inf:inf) 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.
see also: prepend