String Manipulation
Posted: Mon Jun 06, 2005 12:04 am
I'm looking for a good way to filter certain characters out of a given string. Suppose I start out with a string:
"frag men d'ary a`la word"
What's the best way of filtering it down to:
"fragmendaryalaword"
I figured I could clean it up in 3 passes by looking for 1 of the 3 characters I'm removing and picking out the string segments that happen between what I'm looking to remove with a command like string.token[1,'], and then just concatenating them together.
That seems kinda ugly though. I was not able to find any string methods in the docs to do this and so far searching the boards hasn't shown anything either. Any other methods I've missed?
"frag men d'ary a`la word"
What's the best way of filtering it down to:
"fragmendaryalaword"
I figured I could clean it up in 3 passes by looking for 1 of the 3 characters I'm removing and picking out the string segments that happen between what I'm looking to remove with a command like string.token[1,'], and then just concatenating them together.
That seems kinda ugly though. I was not able to find any string methods in the docs to do this and so far searching the boards hasn't shown anything either. Any other methods I've missed?