SnakeCase is variadic function that takes one Param slice of strings named rule and it returns passed string in snake case form. Rule param helps to omit character you want to omit from string. By default special characters like "_", "-","."," " are treated like word separator and treated accordingl
(rule ...string)
| 328 | // like word separator and treated accordingly by default and you don't have to worry about it. |
| 329 | // If you don't want to omit any character pass nothing. |
| 330 | func (i *input) SnakeCase(rule ...string) StringManipulation { |
| 331 | input := getInput(*i) |
| 332 | wordArray := caseHelper(input, false, rule...) |
| 333 | i.Result = strings.Join(wordArray, "_") |
| 334 | return i |
| 335 | } |
| 336 | |
| 337 | // Surround takes one param with which is used to surround user input and it |
| 338 | // can be chained on function which return StringManipulation interface. |
nothing calls this directly
no test coverage detected