> > Your original question used different terminology. I assumed that your
> > were asking whether StrNCopy will write a null terminator to the
> > destination string if the length of the source string exceeds the number
> > of characters to be copied (the last argument). Maybe you should restate
> > the question. :) --
>
> My question is:-
>
> {
> Char dst[200];
> Char src[500];
> MemSet(src, 499, 32);
> src[500] = \0;
^^ overshooting your array :)
> StrNCopy(str, src, 200);
^^ str is? you mean dst here?
> FrmCustomAlert(ID_ALERT, "It ", src[500] == \0 ? "is": "is not", "
> terminated");
> }
>
> What would the alert say?
it would say "It is terminated." - if you used 499 instead of 500 :P
if StrNCopy() worked, src[500] (well, 499) would still be '\0'. the
routine would not touch anything after index 199 :) *grin*
but, why not try it yourself? :) at least provide working code :P
// az
[EMAIL PROTECTED]
http://www.ardiri.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/