Posted By

petrafull on 10/27/09


Tagged

replace strip


Versions (?)

Actionscript 3 version of the php stripslashes function


 / Published in: ActionScript 3
 

  1. function trimslashes(raw:String):String {
  2. var str = new String(raw);
  3. var myPattern:RegExp = /\\'/g;
  4. str = str.replace(myPattern, "'")
  5. myPattern = /\\\\/g;
  6. str = str.replace(myPattern, "\\")
  7. return str;
  8. }

Report this snippet  

You need to login to post a comment.