I have this as3 function
public static function StringReplaceAll( source:String, find:String, replacement:String ) : String {
return source.split( find ).join( replacement );
}
Works fine: any idea how to make it case insenstive ?
Regards
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just use the String#replace() function.
for example:
The first argument in the replace function is a regular expression. You’ll find information about them all over the web. And there’s this handy tool from Grant Skinner called Regexr with which you can test your regular expressions ActionScript style.
The part between the two forward slashes (/) is the actual regex.
Note that
/e/giis actually just a shorthand fornew RegExp("e", "gi")