Graphing, Concatenate strings, and misc questions
Bert Freudenberg
bert at isg.cs.uni-magdeburg.de
Thu May 31 09:12:02 UTC 2001
On 30 May 2001, J Scott Jaderholm wrote:
> I've looked at the SerialPort code a bit so say once i read it in I
> have '63,65,3,34,35,88,54cr32,33,34,43,22,23,22' any ideas on how I'd
> change that into #(#(63 65 3 34 35 88 54) #(32 33 34 43 22 23 22)) or
> where to look for hints or any code that does somethign similiar?
| s |
s := '63,65,3,34,35,88,54', String cr, '32,33,34,43,22,23,22'.
out := (s findTokens: String cr) collect: [:line |
(line findTokens: ',') collect: [:num | num asNumber]].
You may throw in an #asArray if the OrderedCollections returned bothers
you.
> I was also unable to find a method that would concatenate two strings,
> any ideas?
#, (see above)
You could have found this by using the Method Finder with this example:
'a'. 'b'. 'ab'
-- Bert
More information about the Squeak-dev
mailing list
|