-2
A
回答
0
#include <boost/algorithm/string.hpp>
std::vector<std::string> strs;
boost::split(strs, "17, 132, asdasd, 111", boost::is_any_of(","));
+0
我有兩個例子''',但我只想爲第一個分割。 在你的例子中,我想在矢量17和132中使用2個元素,asdasd,111 – Roka
相關問題
- 1. 分裂串 - asp.net C#
- 2. 分裂串
- 3. 分裂用C
- 4. C#分裂和從字符串
- 5. 分裂和訪問字符串用C
- 6. C++分裂一個字符串
- 7. 分裂串入列
- 8. C#平方分裂
- 9. 分裂與子組串
- 10. 分裂在VB字符串
- 11. 字符串分裂在JavaScript?
- 12. 分裂ArrayList的字符串
- 13. 分裂的JavaScript字符串
- 14. 分裂/子串數組 - PHP
- 15. 分裂Java字符串
- 16. 分裂串入在python
- 17. 與preg_split分裂字符串
- 18. Android-分裂URL字符串
- 19. C++分裂使用wstring unicode分隔字符串
- 20. RcppArmadillo和C++分裂問題
- 21. 分裂兩個雙,C#
- 22. 分裂和訂購C類#
- 23. Python:分裂和分裂
- 24. 分割字符串,請記住分裂
- 25. 分裂陣列分隔成字符串
- 26. 分裂串具有多個分離器
- 27. 分裂空格分隔字符串
- 28. 淨分裂與分裂字符保留
- 29. Python decode_header分裂原始字符串
- 30. VBA分裂(字符串,「\\」」創先爭優
的['的std :: getline'](http://en.cppreference.com/w/cpp/ string/basic_string/getline)函數實際上可以使用任意字符作爲「行尾」,而不僅僅是換行符。它可以和['std :: istringstream'](http://en.cppreference.com/w/cpp/io/basic_istringstream)一起用於這種字符串「分割」。 –
因爲你正在尋找'string :: find_first_of'這個東西的第一個東西,所以它是一個很好的匹配;) – pergy