I am currently splitting a string at every occurrence of a forward slash. In the case of a path that uses backward slashes instead of forward slashes, how can I accomplish the split function at all backward slashes if they are instead used? Thanks for any help.
我目前正在每次出现正斜杠时拆分一个字符串。对于使用反斜杠而不是正斜杠的路径,如果使用反斜杠,如何在所有反斜杠中完成分割功能?谢谢你的帮助。
Dim p() as string
p = Split(strP, "/")'Or backward slash
1 个解决方案
#1
4
p = someString.Split("/"c, "\"c)
#1
4
p = someString.Split("/"c, "\"c)