字符串切割

字符串
Both Server and Client
Both Mobile and PC

以指定字符串为分隔符,将目标字符串切割为若干个切片后输出新字符串,连续的N个分隔符会切割为N-1个半角空格作为字符串列表元素输出

声明

func Split(target string, sepStr string) List<string>
go

参数

输入

名称 类型 描述
目标 String 目标字符串
分隔符 String 分隔符字符串

返回

类型 描述
ListT_String 输出的字符串列表,总是有一个半角空格元素作为结尾