星之韵

 

ActionScript3.0(5)字符串的处理

1.字符串的转义符 \
 \b        退格
 \f        换页
 \n        换行
 \r        回车
 \unnnn    nnnn为Unicode码,意思是将Unicode码转化成字符
 \xnn      nn为ASCII码
 \'        单引号
 \"        双引号
 \\        反斜杠
2.字符串属性
 2.1 Length属性      字符串的长度
 2.2 charAt属性      字符串指定的字符
 2.3 charCodeAt属性  字符串指定的字符编码
 2.4 fromCharcode(...) 从编码中获得字符串
3.字符串的方法
 3.1字符串比较 ==  != <= >= < >
 3.2所有的对象都提供了toStirng()的方法
 3.3substring(起点,终点)
 3.4substr(起点,字符数)
 3.5slice(起点,终点) 参数为负数,则从尾开始计算
 3.6indexOf()/lastIndexOf()
 3.7split("分隔符"):Array
    split("分隔符",个数):Array
 3.8match//区分大小写
 3.9search//参数设置是否区分大小写
 3.10replace 替换
 3.11 toLowerCase 转化成小写
 3.12 toUpperCase 转化成大写

posted on 2010-04-23 09:44  星之韵  阅读(853)  评论(0)    收藏  举报

导航