2017
03-27
03-27
golang使用空格分割字符串 4470 VIEW
想在go中使用空格进行分割字符串。由于字符串中空格个数不定,或者有可能使用的unicode空格。所以单纯的使用
[crayon-6a5dcf0c1ae85709702696/]
不太方便。
可以使用strings模块提供的另一种方法
[crayon-6a5dcf0c1ae8d591232459/]
示例
[crayon-6a5dcf0c1ae91063065163/]
结果
[a .... read more