test: add example function for strutil package

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

No files matched your search

+2 -1
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