String Concatenation #
str a = 33 # " inch"; str b = 1 # 2 # 3;
String concatenation using the # operator is carried out using a new StrBuf for each expression. For performance, it's often better to use a StrBuf manually, preallocating it to a suitable size, and thereby avoiding a lot of redundant allocation of temporary memory.
You could also use #= to concatenate strings.
str a = "P"; a #= "ADDED";
Symbol #
symbol a = #alpha; symbol b = #"beta and gamma";
Resource Lookup $
str a = $cancelButtonLabel;
Resolves to getRs("cancelButtonLabel", #:package)
.
Comments
0 comments
Please sign in to leave a comment.