We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8356e14 commit e9ccc46Copy full SHA for e9ccc46
1 file changed
src/test/java/org/sooo/base/CharMatcherTest.java
@@ -69,4 +69,30 @@ public void retainOnlyDigitsAndLowerCases() {
69
// then
70
assertThat(lowerAndDigit, is("2oreansnd3mericans"));
71
}
72
+
73
+ @Test
74
+ public void removeNonASCIIAndTabCharacters() {
75
+ // given
76
+ String input = "This string has Korean characters(한국어) and a tab\tcharacter.";
77
78
+ // when
79
+ String filtered = CharMatcher.ASCII.and(CharMatcher.isNot('\t'))
80
+ .retainFrom(input);
81
82
+ // then
83
+ assertThat(filtered,
84
+ is("This string has Korean characters() and a tabcharacter."));
85
+ }
86
87
88
+ public void countTabCharacter() {
89
90
+ String input = "\ta\tb\tc\td";
91
92
93
+ int count = CharMatcher.is('\t').countIn(input);
94
95
96
+ assertThat(count, is(4));
97
98
0 commit comments