172
rated 0 times
[
174]
[
2]
/ answers: 1 / hits: 163020
/ 15 Years ago, mon, april 20, 2009, 12:00:00
Does JavaScript have a built-in function like PHP's addslashes
(or addcslashes
) function to add backslashes to characters that need escaping in a string?
For example, this:
This is a demo string with
'single-quotes' and double-quotes.
...would become:
This is a demo string with
'single-quotes' and
double-quotes.
More From » string