I had the same experience with StrNCopy. I did believe that I would
always get a string back, when using string routines.
But no. And by closely reading the StrNCopy docs, this is correct
behavior.
I had hoped to be able to copy any-big-string into a buffer of a max
size, and still end up with a normal string in the buffer without
manually always clear the last byte.
This definition of StrNxxxx is from the C world I guess, although I
cannot see anywhere this is stated. The functions just happens to have
the same names, and defined to work the same way.
I am doing Pascal version of string handling, and also had the
experience that StrCompare would rank a ":" before a "9".
So I have ended up in doing the Str runtime parts with my own
functions, but very small anyway.
I would rather like the definition Keith came up with:
>>This is the expected behavior. The function accepts "strings" as
parameters.
>>A "string" is a sequence of characters terminated by a NULL.
Then string handling procedures would always work on and produce
strings.
--
Christen Fihl
http://HSPascal.Fihl.net/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/