0

If I have a character list already, how can I remove certain character, or replace all occurrences of such character with another character?

Shog9
  • 156,901
  • 35
  • 231
  • 235
Beatle
  • 43
  • 2

1 Answers1

2
# remove any 'l'
'hello world' 'l'-
puts

# replace all 'l' with 'X'
'hello world' 'l'/ 'X'* 
puts

Please also have a look into the page for GolfScript built-ins.

Howard
  • 38,639
  • 9
  • 64
  • 83