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

Ben Knight
Sun, 22 Jul 2007 16:17:49 -0000

Hi, Jamal.  I ended up using the delete function and you are right, it
wasn''t hard :-)  I wasn''t sure what the PHP function did
exactly since
I''m not a PHP developer but I ended up doing something like this and I
believe it duplicates the PHP functionality:


data.delete(''\r'').delete(''\n'').delete("\\")


Jamal Soueidan wrote:
> Well, It shouldn''t be hard :)
>
> Does the function just strip the slashes as below?
>
> Example
> \''nice\nguy\''
>
> Result
> ''nice
> guy''