C++ string分割
string分割
方法一:使用find()
和substr()
.
用字符分割字符串:
1 | // 使用字符分割 |
用字符串分割字符串
整个字符串
splits
作为分隔符。
1 | // 使用字符串分割 |
方法二:使用istringstream
.
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.