mirror of https://github.com/gobeam/stringy.git
There are cases where you want the delimiter to be a space
I figure that if the user is just passing in a single " " then that would match that case. However it don't handle the case of multiple `" "` being intentional -- I'm not sure how you would want to handle this. Perhaps, if the change should be on 173?
This commit is contained in:
parent
3769c2b2bb
commit
09576ff387
|
@ -169,7 +169,7 @@ func (i *input) ContainsAll(check ...string) bool {
|
|||
// by default and you dont have to worry about it.
|
||||
func (i *input) Delimited(delimiter string, rule ...string) StringManipulation {
|
||||
input := getInput(*i)
|
||||
if strings.TrimSpace(delimiter) == "" {
|
||||
if strings.TrimSpace(delimiter) == "" && delimiter != " " {
|
||||
delimiter = "."
|
||||
}
|
||||
wordArray := caseHelper(input, false, rule...)
|
||||
|
|
Loading…
Reference in New Issue