
19 Aug
2007
19 Aug
'07
8:20 a.m.
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.