Re: PHP "stripclashes" equivalent in Ruby/Rails?

Jamal Soueidan
Sun, 22 Jul 2007 08:41:18 -0000

Ben Knight wrote:
> I''m porting some code from PHP into Rails; is there an equivalent
of the
> PHP "stripcslashes" function in Ruby/Rails?
>
> http://us.php.net/stripcslashes

Well, It shouldn''t be hard :)

Does the function just strip the slashes as below?

Example
\''nice\nguy\''

Result
''nice
guy''