A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

© Lblnc 中级黑马   /  2015-7-29 13:49  /  156 人查看  /  0 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

ic int length():                                                        获取字符串的长度。
public char charAt(int index):                                获取指定索引位置的字符
public int indexOf(int ch):                                        返回指定字符在此字符串中第一次出现处的索引。
public int indexOf(String str):                                返回指定字符串在此字符串中第一次出现处的索引。
public int indexOf(int ch,int fromIndex):                返回指定字符在此字符串中从指定位置后第一次出现处的索引。
public int indexOf(String str,int fromIndex):                返回指定字符串在此字符串中从指定位置后第一次出现处的索引。
public String substring(int start):                                从指定位置开始截取字符串,默认到末尾。
public String substring(int start,int end):                从指定位置开始到指定位置结束截取字符串。

0 个回复

您需要登录后才可以回帖 登录 | 加入黑马