Skip to content

Commit 9cbe21e

Browse files
subString的例子
1 parent 989ac59 commit 9cbe21e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/com/StringUtilsDemo.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ public static void equalsIgnoreCase(){
3838
}
3939
}
4040

41+
public static void subString(){
42+
String str="abcd";
43+
String str1=StringUtils.substring(str,1,3);
44+
System.out.println(str+"的中间字符是"+str1);
45+
46+
}
4147

4248
public static void main(String[] args) {
4349

0 commit comments

Comments
 (0)