feat: add SubInBetween

This commit is contained in:
dudaodong committed 2024-02-06 16:47:30 +08:00
1 parent fa298b740d
commit f9e047f190
5 files changed
+108 -2

No files matched your search

+14
View File
@@ -653,3 +653,17 @@ func ExampleRemoveWhiteSpace() {
// helloworld
// hello world
}
func ExampleSubInBetween() {
str := "abcde"
result1 := SubInBetween(str, "", "de")
result2 := SubInBetween(str, "a", "d")
fmt.Println(result1)
fmt.Println(result2)
// Output:
// abc
// bc
}