R
raxitsheth2000
Hi,
we have strNcpy, strNcmp etc, (small n obviously), but why not in
strlen ?
the question is i am having some buffer
strlen(buff);
what happen if buff is not containing '\0', (i have try some prog. it
will crashing/printing junk chars, using valgrind its showing invalid
mem read etc..) so what i think is i made something simillar to above
N-versioned of strlen which will check for strlen of buff for some MAX
char, and return appropriate result.
I want to ask that any simillar implementation already available ?
C-Std says anything about this ?
--raxit sheth
we have strNcpy, strNcmp etc, (small n obviously), but why not in
strlen ?
the question is i am having some buffer
strlen(buff);
what happen if buff is not containing '\0', (i have try some prog. it
will crashing/printing junk chars, using valgrind its showing invalid
mem read etc..) so what i think is i made something simillar to above
N-versioned of strlen which will check for strlen of buff for some MAX
char, and return appropriate result.
I want to ask that any simillar implementation already available ?
C-Std says anything about this ?
--raxit sheth