1. Implement a function func trimLeftSpace(s string) string that returns a slice of the string s with all leading space characters (https://en.wikipedia.org/wiki/Space_(punctuation)) removed:

    Example:

    trimLeftSpace("gopher") -> "gopher"
    trimLeftSpace("  go goper") -> "go gopher"
    
  2. Implement a function func trimRightSpace(s string) string that returns a slice of the string s with all trailing space characters (https://en.wikipedia.org/wiki/Space_(punctuation)) removed:

    Example:

    trimRightSpace("gopher") -> "gopher"
    trimRightSpace("go goper  ") -> "go gopher"
    
  3. Implement a function func trimSpace(s string) string that returns a slice of the string s with all leading and trailing space characters (https://en.wikipedia.org/wiki/Space_(punctuation)) removed:

    Example:

    trimSpace("  we are surrounded  ") -> "we are surrounded"
    
  4. Implement a function func index(s, subs string) int that returns the index of the left-most instance of substring subs in s, or -1 if substring subs does not present in s:

    Example:

    index("foo", "oo") -> 1
    index("foo", "") -> 0
    index("foo", "bar") -> -1
    
  5. Implement a function func rightIndex(s, subs string) int that returns the index of the right-most instance of substring subs in s, or -1 if substring subs does not present in s:

    Example:

    rightIndex("foofoo", "oo") -> 4
    rightIndex("foo", "") -> 3
    rightIndex("foo", "bar") -> -1
    
  6. Implement a function func indices(s, subs string) []int that returns all indices of substring subs in s with an overlap (it means that “oo” in “ooo” will be matched twice - at positions 0 and 1):

    Example:

    rightIndex("fooofooo", "oo") -> [1 2 5 6]
    rightIndex("foo", "") -> []
    rightIndex("foo", "bar") -> []
    
  7. Implement a function func isNumber(s string) bool that returns true if s consists of digits [0..9] only:

    Example:

    isNumber("")     -> false
    isNumber("abc")  -> false
    isNumber("12ab") -> false
    isNumber("0")    -> true
    isNumber("123")  -> true
    
  8. Implement a function func itoa(n int) string that returns a string representation (base 10) of a given integer:

    Example:

    itoa(0)    -> "0"
    itoa(123)  -> "123"
    itoa(-123) -> "-123"
    
  9. Implement a function func normalizeNumber(n string) (norm string, num bool) that removes trailing space characters and leading ‘0’ and space characters if n is a number (as returned by isNumber() function). If n is not a number, then isNumber return value should be set to false:

    Example:

    normalizeNumber("")        -> ["" false]
    normalizeNumber("  ")      -> ["" false]
    normalizeNumber("  abc  ") -> ["" false]
    normalizeNumber("  00123") -> ["" true]
    
  10. Implement a function func insertAt(s, subs string, i int) string that inserts a substring into a string after an index provided. If the initial string is too short, space character should be used to fill the necessary space. Negative index is valid and means that the insertion index starts from the end of the string in negative direction.

    Example:

    insertAt("bar", "foo", 0) -> "foobar"
    insertAt("bar", "foo", 1) -> "bfooar"
    insertAt("bar", "foo", 3) -> "barfoo"
    insertAt("bar", "foo", -1) -> "barfoo"
    insertAt("bar", "foo", 4) -> "bar foo"
    insertAt("", "foo", 4) -> "    foo"