1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-06 21:52:28 +08:00

feat: add SubInBetween

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

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
}