mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
test: add example function for strutil package
This commit is contained in:
1 parent
b07356423f
commit
a58e52e53c
7 files changed
+344
-12
No files matched your search
+2
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user