Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
In [1]:
import "strings"
In [5]:
strings.Index("go gopher", "go")
Out[5]:
In [6]:
strings.Index("go gopher", "roden")
Out[6]:
In [3]:
strings.LastIndex("go gopher", "go")
Out[3]:
In [4]:
strings.LastIndex("go gopher", "rodent")
Out[4]:
In [2]:
strings.HasPrefix("International", "Inter")
Out[2]:
In [4]:
strings.HasSuffix("International", "national")
Out[4]:
In [3]:
strings.Join([]string{"a", "b", "c"}, ", ")
Out[3]:
In [3]:
strings.Replace("how are you", "how", "How", 1)
Out[3]:
In [4]:
strings.ReplaceAll("how are you", "how", "How")
Out[4]:
In [2]:
strings.Split("a", "a")
Out[2]:
In [3]:
strings.Split("abc", "\n")
Out[3]:
In [5]:
strings.Split("how,are,you", ",")
Out[5]:
In [ ]: