So I need to split a c++ string object based on some delimiters. what strtok() does on c-strings is basicaly what I need to do. I was looking at the stringstream class and was thinking I could use that, but input is always split on whitespace and I can't find a way to tell it my own delimiters.
Besides just calling c_str() and using strtok, how can I easily get it's equilivant?
Name:
Anonymous2006-11-06 23:52
maybe a combination of string.find() and substring()
Name:
Anonymous2006-11-07 11:26
Use the PCRE library.
Name:
Anonymous2006-11-07 11:44
I'd rather suffocate myself with my own tounge than do anything with strings in C/C++/Java
the awesomenes of CEGUIs layout syntax > all.
ok, the only other layout syntax i know is css and it sucks so much.
Name:
Anonymous2006-11-24 6:41
CSS > XML
Imagine the pain in the arse it would have been if it had been XML.
Name:
Anonymous2006-11-24 17:35
Everything should be XML. For an example of the superiority of XML, I present my .fonts.conf file: <?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintfull</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="rgba" >
<const></const>
</edit>
</match>
</fontconfig>See how much more readable, maintainable, scalable and enterprisey this is compared to an ugly hack such as: hinting=true
hintstyle=hintful
rgba=
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy