feat: add RemoveWhiteSpace

This commit is contained in:
dudaodong committed 2023-06-08 16:47:31 +08:00
1 parent bfa9091c09
commit 9b829aa695
3 files changed
+44

No files matched your search

+14
View File
@@ -619,3 +619,17 @@ func ExampleContainsAny() {
// true
// false
}
func ExampleRemoveWhiteSpace() {
str := " hello \r\n \t world"
result1 := RemoveWhiteSpace(str, true)
result2 := RemoveWhiteSpace(str, false)
fmt.Println(result1)
fmt.Println(result2)
// Output:
// helloworld
// hello world
}