"Herbert" == Herbert König herbertkoenig@gmx.net writes:
Herbert> Hello Alex, AC> Thanks. I'll try to start with the indexing table for each character first. AC> Anyway do you know how to split string based on more than 1 AC> character, for example I want to split string based on some AC> punctuation. I have tried using tokenBasedOn, but still can not AC> figured out how to use it for more than 1 separator.
String> findTokens: is your friend here.
Herbert> I have a code fragment which reads
Herbert> tokens := comment asLowercase findTokens: mySeparators
Herbert> As I use this fairly often, someplace I have code to initialise Herbert> mySeparators like:
Herbert> mySeparators := Array new: 13 Herbert> mySeparators at: 1 put: $- ; at: 2 put: $( ..... Herbert> and so on.
You can just write that as a literal:
mySeparators := #($- $().