equiv from python

Dan Stromberg strombrg at seki.acs.uci.edu
Tue Aug 28 23:25:16 CEST 2001


Does c++ have an equivalent to this from python:

>>> import string
>>> s='ab:cd:efg:ghi:'
>>> print string.splitfields(s,':')
['ab', 'cd', 'efg', 'ghi', '']

IE, can the standard c++ library take a string, split it up on a
particular separator character, and return the corresponding list of
strings?

I know I can write something to do this, but I'd rather learn how to
use the STL or similar, if applicable.

-- 
Dan Stromberg                                               UCI/NACS/DCS



More information about the Python-list mailing list