Boost logo

Boost Users :

From: Pavol Droba (droba_at_[hidden])
Date: 2007-05-19 04:04:17


Hi,

You can use tokenizer facilities provided in the string_algo library.
They can operate on char* as well as on std::string.

Here are the references.

http://www.boost.org/doc/html/string_algo/usage.html#id1638440
http://www.boost.org/doc/html/string_algo/reference.html#header.boost.algorithm.string.split.hpp
http://www.boost.org/doc/html/string_algo/reference.html#header.boost.algorithm.string.find_iterator.hpp

Best Regards,
Pavol.

ivan_at_[hidden] wrote:
> Hi,
>
> I am doing very large loop where i need to tokenize a string in each iteration.
>
> At each iteration of the loop there will be a string contained in char*.
>
> It seems that in order to use the boost tokenizer, it is necessary to copy the
> string into a std::string rather than using the data directly from the char*.
> This is adding a copy for each iteration to the loop.
>
> Is there no way to use the tokenizer directly on a char* rather than
> std::string?
>
> Thank you,
> Ivan Novick
> http://www.0x4849.net
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net