Bert Freudenberg wrote:
Guess I have to provide an alternative:
#('&' '&' '<' '<' '>' '>' '''' ''' '"' '"') pairsDo: [:c :s| string := string copyReplaceAll: c with: s].
(this is the same approach as in String>>asHTML)
Ok, to nitpick (;)) one message send less for each pair:
#('&' '&' '<' '<' '>' '>' '''' ''' '"' '"') pairsDo: [:c :s| string := string copyReplaceAll: c with: s asTokens:false].
How do pairs compare to dictionaries in Squeak?