java基础----String类命令
2018-01-13 16:40
246 查看
1、 regionMatches方法
regionMatches方法用于检测两个字符串在一个区域内是否相等
regionMatches方法用于检测两个字符串在一个区域内是否相等
public boolean regionMatches(int toffset, String other, it ooffset, int len) public boolean regionMatches(boolean ignoreCase, int toffset, String other, it ooffset, int len) param: ignoreCase : 如果为true, 则比较字符时忽略大小写 toffset: 此字符串中子区域的起始偏移量 other: 字符串参数 ooffset: 字符串参数中子区域的起始偏移量 len: 要比较的字符数 retun: 如果成功比配,则返回true,否则返回false 例子: String str1 = "m.runoob.com"; String str2 = "runoob"; System.out.println(str1.regionMatches(2, str2, 0,5));
相关文章推荐
- 一、java包的用法---基础,二、包的用法---进阶,三、JAR命令用法,包是一组类的集合,包其实就是多个文件夹构成的多级目录,包名全部用小写字母表示,在程序中要声明类所属的包时,用package
- 黑马程序员-java基础 String类
- Java(JVM)虚拟机结构基础,和JAR文件包及jar命令详解
- Java基础之String类--String类、StringBuffer类、包装类
- 黑马程序员---Java基础--13天(String类)
- Java基础:String类之常用方法及使用注意事项
- 【Java基础 003】 jar的运行命令
- java程序员菜鸟进阶(三)oracle基础详解(三)常用的SQL PLUS命令详解
- 黑马程序员_java基础(5)--String类
- 黑马程序员----JAVA基础之String类
- java基础之String类
- 【JAVA基础】0014--------websphere命令详解
- java程序员菜鸟进阶(三)oracle基础详解(三)常用的SQL PLUS命令详解
- 黑马程序员 Java基础 ---> String类
- Java基础知识之系统命令调用、序列化、JDO、匿名内部类
- 黑马程序员--Java基础学习--String类剖析
- JAVA基础----page命令
- Java(JVM)虚拟机结构基础,和JAR文件包及jar命令详解
- 黑马程序员_Java基础_String类
- java基础知识记录--String类 (摘自张孝祥整理java面试题)