Monday, November 26, 2007

Basic Text Synthesis and String Manipulation

A quick example from a session with Dakis:




a = String.new;
a.size




60.asAscii


a = String.new.addAll(Array.rand(5, 30, 90) collect: _.asAscii);


b = a ++ "ending"
c = a ++ "------ another ENDING";
a.first


a.addAll([$1, $2, $3]);

No comments: