1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-08 14:42:27 +08:00

test: add example function for strutil package

This commit is contained in:
dudaodong
2022-12-27 15:40:51 +08:00
parent b07356423f
commit a58e52e53c
7 changed files with 344 additions and 12 deletions

View File

@@ -153,7 +153,8 @@ func BeforeLast(s, char string) string {
return s[0:i]
}
// After create substring in source string after position when char first appear
// After returns the substring after the first occurrence of a specified string in the source string.
// Play: https://go.dev/play/p/RbCOQqCDA7m
func After(s, char string) string {
if s == "" || char == "" {
return s