Mail Archives: djgpp-workers/2003/09/01/11:32:01
> strxfrm(NULL, "hello", 0) = 0
> strxfrm(answer, "hello", 9) = 5
> strxfrm(answer, "hello", 3) = 5
>
> For comparison, here is what my function gives for answers:
>
> strxfrm(NULL, "hello", 0) = 5
> strxfrm(answer, "hello", 9) = 5
> strxfrm(answer, "hello", 3) = 2
Linux does not agree:
strxfrm ((null), hello, 0) = 5
strxfrm (buf, hello, 9) = 5
strxfrm (buf, hello, 3) = 5
"returns the length of the transformed string" means the
transformation of the source, not the stored results. I.e., the
length *before* truncating to fit the buffer.
Remember, "n" is the size of the output buffer, not the size of the
input string.
- Raw text -