Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2007-08-19 04:20:03


Anders Dalvander wrote:
>> The ideal interface would be:
>> 1) terminate when NULL character is found
>> 2) if NULL character not found, terminate when end marker is reached.
>
> char buffer[BUFFER_SIZE];
> char* buffer_begin = buffer;
> char* buffer_end = buffer + BUFFER_SIZE;
> // TODO fill buffer with string.
> char* string_begin = buffer;
> char* string_end = std::find(buffer_begin, buffer_end, 0);
> // TODO call regex with string_begin and string_end.

Doh! Consider me suitably chastened that I didn't think of that ! :-)

John.


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