mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-07 14:18:05 +08:00
add test for replace
This commit is contained in:
parent
c1c862dda7
commit
f61c843e69
@ -5,6 +5,12 @@ import org.junit.Test;
|
|||||||
|
|
||||||
public class CharSequenceUtilTest {
|
public class CharSequenceUtilTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void replace() {
|
||||||
|
String actual = CharSequenceUtil.replace("SSM15930297701BeryAllen", Pattern.compile("[0-9]"), matcher -> "");
|
||||||
|
Assert.assertEquals("SSMBeryAllen", actual);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void addPrefixIfNotTest(){
|
public void addPrefixIfNotTest(){
|
||||||
String str = "hutool";
|
String str = "hutool";
|
||||||
|
Loading…
Reference in New Issue
Block a user