String的使用方法
2020-08-25 22:29
351 查看
String当中与获取相关的常用的方法有:
public int length() 获取字符串当中含有的字符个数,拿到字符串长度。
public String concat(String str) 将当前字符串和参数字符串拼接成为返回值新的字符串
public char charAt (int index)获取指定索引位置的单个字符,(将索引从0开始)
public int indexof(String str) 查找参数字符串在本字符串当中首次出现的索引位置,如果没有返回-1值
相关文章推荐
- 使用String.split方法时要注意的问题
- 使用String.split方法时要注意的问题
- ASP.NET中String.IndexOf 方法的使用
- String.Format 方法的使用
- JAVA String.format 方法使用介绍
- 使用String.split方法时要注意
- String.spit()的使用方法总结
- 不赞成使用类型 ServletRequest 的方法 getRealPath(String)
- win32使用OutputDebugString输出调试信息的方法
- iostream iterator的使用。 string转float 和long的方法
- ASP.NET中String.IndexOf 方法的使用
- JAVA String.format 方法使用介绍
- String.format函数使用方法介绍
- String.format函数使用方法介绍
- (转)C++ stringstream介绍,使用方法与例子
- java中string对象中的split方法的使用
- Javascript中使用String对象的方法
- String的split()的方法的使用
- OCCI开发中getString()方法使用中的问题
- String.format函数使用方法介绍