Go Standard Library Cookbook
上QQ阅读APP看书,第一时间看更新

Breaking the string into words

Breaking the string into words could be tricky. First, decide what the word is, as well as what the separator is, and if there is any whitespace or any other characters.  After these decisions have been made, you can choose the appropriate function from the strings package. This recipe will describe common cases.