If you are building it one char at a time, don't
bother w/ StrNCat.
i = StrLen(string);
while (msg[CharNum] != '&') {
string[i++] = msg[CharNum++];
}
string[i++] = '\0'; // terminate the target string
Much less overhead this way than calling StrNCat
and StrNCompare ...
--
-Richard M. Hartman
[EMAIL PROTECTED]
186,000 mi/sec: not just a good idea, it's the LAW!
Sam Trimble wrote in message <[EMAIL PROTECTED]>...
>
>Hey,
> I'm using the following code to create a string 1 charater at a time...
but
>the StrNCat function only works the first time through... any help on this
>would be appreacated...
>
>
>while(StrNCompare(&msg[CharNum], "&", 1)) /*while the charater doesn't
>equal a "&" */
>{
> StrNCat(String, &msg[CharNum], 2); /*copy the charater
to
>the string */
> CharNum++; /*
>increase the charater number */
>}
>
>oh by the way... msg is a CharPtr....
>
>
>
>
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/