
18 Aug
2007
18 Aug
'07
9:11 a.m.
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.