1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-08 14:42:27 +08:00

feat: add RemoveNonPrintable

This commit is contained in:
dudaodong
2023-03-30 14:52:32 +08:00
parent e56a8a1ef5
commit 217350042b
5 changed files with 95 additions and 0 deletions

View File

@@ -342,3 +342,10 @@ func TestWordCount(t *testing.T) {
assert.Equal(v, WordCount(k))
}
}
func TestRemoveNonPrintable(t *testing.T) {
assert := internal.NewAssert(t, "TestRemoveNonPrintable")
assert.Equal("hello world", RemoveNonPrintable("hello\u00a0 \u200bworld\n"))
assert.Equal("你好😄", RemoveNonPrintable("你好😄"))
}