I need to replace some characters as follows: &
➔ \&
, #
➔ \#
, …
I coded as follows, but I guess there should be some better way. Any hints?
strs = strs.replace('&', '\&')
strs = strs.replace('#', '\#')
...
I need to replace some characters as follows: &
➔ \&
, #
➔ \#
, …
I coded as follows, but I guess there should be some better way. Any hints?
strs = strs.replace('&', '\&')
strs = strs.replace('#', '\#')
...