Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2007-08-18 05:11:37


Venkat Rangan wrote:
> John,
>
> Thanks very much - this is almost what we want. We did notice that if
> there is a null before the end, the search does not stop. Any way to
> overcome that? We wouldn't mind doing a strlen(), but that is prone to
> failure, so something like strlen_s() or a safe strlen would help. But
> strlen_s() is not available in Microsoft MSDN 7.1.

Ah, so you want the search to terminate if *either*:

* There is a NULL character
* We hit a certain length

Is that right?

I must admit to being a tad confused here: how do you know how long the
string is (when it's created for example?) Surely you must have a length
stored somewhere?

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