开发者

text replace using charcode in AS3

开发者 https://www.devze.com 2023-01-17 19:03 出处:网络
Ho开发者_JAVA百科w do you replace text based on a charcode?var charcode = 34; //example, put whatever here

Ho开发者_JAVA百科w do you replace text based on a charcode?


var charcode = 34; //example, put whatever here
var char = String.fromCharCode(charcode);

var string_to_edit = 'This is my string.';

var new string = string_to_edit.replace(char, 'whatever you are replacing with');

You may have to make that a pattern to use replace(), but I don't think so.

0

精彩评论

暂无评论...
验证码 换一张
取 消