feat: add RemoveNonPrintable

This commit is contained in:
dudaodong committed 2023-03-30 14:52:32 +08:00
1 parent e56a8a1ef5
commit 217350042b
5 files changed
+95

No files matched your search

+11
View File
@@ -438,3 +438,14 @@ func ExampleWordCount() {
// 0
// 0
}
func ExampleRemoveNonPrintable() {
result1 := RemoveNonPrintable("hello\u00a0 \u200bworld\n")
result2 := RemoveNonPrintable("你好😄")
fmt.Println(result1)
fmt.Println(result2)
// Output:
// hello world
// 你好😄
}