PascalCase is variadic function which takes one Param rule i.e slice of strings and it returns input type string in camel case form and rule helps to omit character you want to omit from string. By default special characters like "_", "-","."," " are l\treated like word separator and treated accordi
(rule ...string)
| 141 | // Example input: hello user |
| 142 | // Result : HelloUser |
| 143 | func (i *input) PascalCase(rule ...string) StringManipulation { |
| 144 | input := getInput(*i) |
| 145 | // removing excess space |
| 146 | wordArray := caseHelper(input, true, rule...) |
| 147 | for i, word := range wordArray { |
| 148 | wordArray[i] = ucfirst(word) |
| 149 | } |
| 150 | i.Result = strings.Join(wordArray, "") |
| 151 | return i |
| 152 | } |
| 153 | |
| 154 | // ContainsAll is variadic function which takes slice of strings as param and checks if they are present |
| 155 | // in input and returns boolean value accordingly |
nothing calls this directly
no test coverage detected