--On 27 July 2001 13:10 -0700 Danny Epstein <[EMAIL PROTECTED]>
wrote:
>> Char dst[201];
>> Char src[500];
>> MemSet(src, 499, 32);
>> src[499] = \0;
>> StrNCopy(str, src, 200);
>
> str -> dst
>
>> FrmCustomAlert(ID_ALERT, "It ", dst[200] == \0 ? "is": "is not", "
> terminated");
>
> StrNCopy won't write more than n characters under any circumstances. In
> your example, it'll write 32 to dst[0] through dst[199]. It won't
> null-terminate dst.
>
> Not to confuse you, but you might find StrNCat to be useful if you don't
> like to manually terminate your strings.
So StrNCat(dst, src, 200) would copy first 199 spaces and set dst[200] ==
'\0', right?
IM -)
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/