M
Michael W. Ryder
Is there a way to denote a null in the replacement for a character using
this method? For example, if I have a = "Jones,Ja'me" and I want to
convert the comma to a space and remove the apostrophe without placing a
character in there. I know I can use a.tr(",", " ").tr("'", "") to get
the desired result but would prefer to be able to say something like
a.tr(",'", " ") and have it remove the apostrophe and replace the comma
in one step. Besides, if I am going to be removing a lot of punctuation
the string could get very long and complicated.
this method? For example, if I have a = "Jones,Ja'me" and I want to
convert the comma to a space and remove the apostrophe without placing a
character in there. I know I can use a.tr(",", " ").tr("'", "") to get
the desired result but would prefer to be able to say something like
a.tr(",'", " ") and have it remove the apostrophe and replace the comma
in one step. Besides, if I am going to be removing a lot of punctuation
the string could get very long and complicated.