Acronym func returns acronym of input string. You can chain to upper which with make result all upercase or ToLower which will make result all lower case or Get which will return result as it is
()
| 59 | // You can chain to upper which with make result all upercase or ToLower |
| 60 | // which will make result all lower case or Get which will return result as it is |
| 61 | func (i *input) Acronym() StringManipulation { |
| 62 | input := getInput(*i) |
| 63 | words := strings.Fields(input) |
| 64 | var acronym string |
| 65 | for _, word := range words { |
| 66 | acronym += string(word[0]) |
| 67 | } |
| 68 | i.Result = acronym |
| 69 | return i |
| 70 | } |
| 71 | |
| 72 | // Between takes two string params start and end which and returns |
| 73 | // value which is in middle of start and end part of input. You can |
nothing calls this directly
no test coverage detected