Actionscript 3 version of the php stripslashes function


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.