This is a creation in Article, where the information may have evolved or changed.
In any language, the string manipulation API is very important, some or memorize better, of course, if you can not remember to see the source file, you have to say that the go language source looks very comfortable.
The API for string manipulation is mostly encapsulated in the strings package, which lists some common
Func Count (S, Sep string) int
Gets the number of specified substrings
Func Contains (S, substr string) bool
Determine if a substring is included
Func Containsany (S, chars string) bool
Determines whether to include any one character in a string, and returns True if any of the characters are included
Func Equalfold (S, t string) bool
When case is ignored, determine whether two strings are equal.
Func fields (s string) []string
is actually the Splite function in other languages, separating the strings, this is separated by a space.
Func Split (S, Sep string) []string
Separates strings by specified characters
Func Fieldsfunc (S string, F func (rune) bool) []string
More powerful custom delimited strings, using functions as arguments
" a,b,c d,e,f " Slice1:bool { if','' ' { returntrue } returnfalse }) Print_array (Slice1)
Func Hasprefix (s, prefix string) bool
Determine whether to start with a string
Func hassuffix (s, suffix string) bool
Determine whether to end with a string
Join this look at the source bar http://www.widuu.com/archives/01/939.html