mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-06 05:01:12 +01:00
Add StringUtils.deleteXmlWhitespace(String)
This commit is contained in:
parent
3a0356488d
commit
1bc8a22b28
2 changed files with 19 additions and 0 deletions
|
|
@ -109,4 +109,16 @@ public class StringUtilsTest {
|
|||
String result = StringUtils.randomString(0);
|
||||
assertEquals("", result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testeDeleteXmlWhitespace() {
|
||||
String noWhitespace = StringUtils.deleteXmlWhitespace(" foo\nbar ");
|
||||
assertEquals("foobar", noWhitespace);
|
||||
|
||||
noWhitespace = StringUtils.deleteXmlWhitespace(" \tbaz\rbarz\t ");
|
||||
assertEquals("bazbarz", noWhitespace);
|
||||
|
||||
noWhitespace = StringUtils.deleteXmlWhitespace("SNAFU");
|
||||
assertEquals("SNAFU", noWhitespace);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue