Chris Tutty <[EMAIL PROTECTED]> wrote in message
news:27470@palm-dev-forum...
>
> "Derek Kite" <[EMAIL PROTECTED]> wrote
> > Does StrNCopy terminate the string with a NULL? All the data looks fine,
> tmpstr
> > contains a truncated string as expected.
> >
> StrNCopy is certainly documented as NUL-terminating the created string,
> never tested to see if it actually does.

Read the docs again, Chris. The string is terminated only if there's room in
the buffer. From the SDK 3.5 docs:

    Copies up to n characters from a source string to the destination
    string. Terminates dst string at index n-1 if the source string length
    was n-1 or less.

-- Keith Rollin
-- Palm OS Emulator engineer




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to