开发者

text replace using charcode in AS3

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜