1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-07 06:02: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

@@ -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
// 你好😄
}