java - How convert the char ' to \' in android? -
is possible convert string "hello i'm boss" "hello i\'m boss" how can please
my problem convert ' \'
somebody have idea please??
string a="hello i'm boss"; i need
result="hello i\'m boss" thanks
you may use replace follows:
string result = a.replace("'","\\'"); note original string a not affected operation.
Comments
Post a Comment