KebabCase is variadic function that takes one Param slice of strings named rule and it returns passed string in kebab case form. Rule param helps to omit character you want to omit from string. By default special characters like "_", "-","."," " are l\treated like word separator and treated accordin
(rule ...string)
| 200 | // Example input: hello user |
| 201 | // Result : hello-user |
| 202 | func (i *input) KebabCase(rule ...string) StringManipulation { |
| 203 | input := getInput(*i) |
| 204 | wordArray := caseHelper(input, false, rule...) |
| 205 | i.Result = strings.Join(wordArray, "-") |
| 206 | return i |
| 207 | } |
| 208 | |
| 209 | // Last returns last n characters from provided input. It removes all spaces in string before doing so. |
| 210 | func (i *input) Last(length int) string { |
nothing calls this directly
no test coverage detected