mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-09-19 20:26:26 +08:00
19 lines
306 B
Go
19 lines
306 B
Go
![]() |
package teambition
|
||
|
|
||
|
import "strings"
|
||
|
|
||
|
func getBetweenStr(str, start, end string) string {
|
||
|
n := strings.Index(str, start)
|
||
|
if n == -1 {
|
||
|
return ""
|
||
|
}
|
||
|
n = n + len(start)
|
||
|
str = string([]byte(str)[n:])
|
||
|
m := strings.Index(str, end)
|
||
|
if m == -1 {
|
||
|
return ""
|
||
|
}
|
||
|
str = string([]byte(str)[:m])
|
||
|
return str
|
||
|
}
|