@@ -14,6 +14,7 @@ limitations under the License.
|
||||
package stringutils
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/asaskevich/govalidator"
|
||||
@@ -75,3 +76,10 @@ func Reverse(s string) string {
|
||||
}
|
||||
return string(buf)
|
||||
}
|
||||
|
||||
func Split(str string, sep string) []string {
|
||||
if str == "" {
|
||||
return nil
|
||||
}
|
||||
return strings.Split(str, sep)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user