question concerning std::getline
Is there a function that does what std::getline does, but takes more than one delimiter?
I want it to stop after line breaks and spaces: '' '' ^ ''\n''
-CProgrammer
I had the same problem a while back with ignoring comments behind '';''s in script files, it ended up I had to write my own function.
boost::tokenizer
- Magmai Kai Holmlor
Not For Rent
[Look for information | GDNet Start Here | GDNet Search Tool | GDNet FAQ | MSDN RTF[L] | SGI STL Docs | STFW | Asking Smart Questions ]
[Free C++ Libraries | Boost | ACE | Loki | MTL | Blitz++ | wxWindows| Spirit(xBNF)]
[Free C Libraries | zlib ]
- Magmai Kai Holmlor
Not For Rent
[Look for information | GDNet Start Here | GDNet Search Tool | GDNet FAQ | MSDN RTF[L] | SGI STL Docs | STFW | Asking Smart Questions ]
[Free C++ Libraries | Boost | ACE | Loki | MTL | Blitz++ | wxWindows| Spirit(xBNF)]
[Free C Libraries | zlib ]
I can easily write my own String tokenizer in C but im trying to cut back on code and stick to C++.
magmai: Is boost::tokenizer a part of stl or what exactly are you refering to.
Extrarius: extraction operator? Coiuld you be more precise, perhaps an example.
Thanks
-CProgrammer
magmai: Is boost::tokenizer a part of stl or what exactly are you refering to.
Extrarius: extraction operator? Coiuld you be more precise, perhaps an example.
Thanks
-CProgrammer
quote:Original post by CProgrammer
I can easily write my own String tokenizer in C but im trying to cut back on code and stick to C++.
magmai: Is boost::tokenizer a part of stl or what exactly are you refering to.
Extrarius: extraction operator? Coiuld you be more precise, perhaps an example.
Thanks
-CProgrammer
boost::tokenizer is part of Boost.
See link in sig.
[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]
extraction operator: >>
I guess you can use that if its only whitspace and line breaks you need it to stop at.
I guess you can use that if its only whitspace and line breaks you need it to stop at.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement