mardi 23 janvier 2018

How to put a backslash before single quote in ruby on rails?

At ruby on rails, my string variable is;

str = "Jane's very good..."

When I typed below;

>> str = "Jane\'s very good..."

"Jane's very good..."


>> str = "Jane\\'s very good..."

"Jane\\'s very good..."


How to get str variable with single quote like "Jane\'s very good..."

Aucun commentaire:

Enregistrer un commentaire