Skip to content

Commit 071e21f

Browse files
committed
🌐 🥚 📱
1 parent be82442 commit 071e21f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

toolTest/spring/src/test/java/SpringUtilTest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public void test2() {
4949
System.out.println("replace('world', 'Java'): " + StringUtils.replace(originalStr, "world", "Java")); // hello Java
5050

5151
// 截取字符串
52-
//System.out.println("substringBefore(' ', originalStr): " + StringUtils.substringBefore(originalStr, " ")); // hello
53-
//System.out.println("substringAfter(' ', originalStr): " + StringUtils.substringAfter(originalStr, " ")); // world
52+
System.out.println("substringBefore(' ', originalStr): " + org.apache.commons.lang3.StringUtils.substringBefore(originalStr, " ")); // hello
53+
System.out.println("substringAfter(' ', originalStr): " + org.apache.commons.lang3.StringUtils.substringAfter(originalStr, " ")); // world
5454

5555
// 字符串拼接
5656
List<String> list = Collections.singletonList("item1");
@@ -62,9 +62,10 @@ public void test2() {
6262
// 其他操作
6363
System.out.println("capitalize(nonEmptyStr): " + StringUtils.capitalize(nonEmptyStr)); // Hello
6464
System.out.println("uncapitalize(nonEmptyStr): " + StringUtils.uncapitalize(nonEmptyStr)); // hELLO
65-
//System.out.println("strip(' hello '): " + StringUtils.strip(" hello ")); // hello
66-
//System.out.println("stripStart('abc', 'ab'): " + StringUtils.stripStart("abc", "ab")); // c
67-
//System.out.println("stripEnd('abc', 'bc'): " + StringUtils.stripEnd("abc", "bc")); // a
65+
66+
System.out.println("strip(' hello '): " + org.apache.commons.lang3.StringUtils.strip(" hello ")); // hello
67+
System.out.println("stripStart('abc', 'ab'): " + org.apache.commons.lang3.StringUtils.stripStart("abc", "ab")); // c
68+
System.out.println("stripEnd('abc', 'bc'): " + org.apache.commons.lang3.StringUtils.stripEnd("abc", "bc")); // a
6869

6970
// todo zsx
7071
}

0 commit comments

Comments
 (0)