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:
@@ -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
|
||||
// 你好😄
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user