Java获取字符串信息
摘要:
String str = "Hello World" 1、str.length();//获取字符串长度 2、str.indexOf(String s);//查找字符在字符串中的位置,该方法用于返回参数字符串s在指定字符串中首次出现的索引位置,当调用字符串的indexOf()方法时,会从当前 的字符串 阅读全文
posted @ 2016-03-09 16:19
傲娇草泥喵
阅读(1051)
评论(0)
推荐(1)