| T X T _ S T R N P C A T ( )
| | | | | SOURCE: qdev_autodocs.txt 1.163 (12/09/2014) English INDEP - TXT_#?
----------------------------------------------------------------------------
NAME
txt_strnpcat() - Concatenate two strings.
SYNOPSIS
res = txt_strnpcat(dst, src, dlen);
LONG txt_strnpcat(LONG *, UBYTE *, LONG *);
FUNCTION
This func. appends 'src' NULL terminated string to 'dst'
NULL terminated string, regarding avail. space in 'dst'.
INPUTS
dst - Pointer to a var. that holds dest. address.
src - Source string.
dlen - Pointer to a var. that holds dest. len.
RETURNS
Returns 0 if everything went fine or negative or positive
value on overflow.
BASES
None.
NOTES
This function does not iterate to find end of the string,
so it is much faster and much safier than 'txt_strncat()',
but you should still NULL terminate the very first byte of
the string!
This f. comes with two more variants: 'txt_strnpcatlc()' &
'txt_strnpcatuc()' who allow to transform the text on the
fly to lower or upper case.
To compute how long the string is you just subtract 'dlen'
from 'dst' capacity.
SEE ALSO
EXAMPLE
...
#define SIZE 256
...
UBYTE buf[SIZE] = {0};
LONG size = SIZE;
LONG addr = (LONG)&buf[0];
txt_strnpcat(&addr, "Hello ", &size);
txt_strnpcat(&addr, "world!", &size);
BUGS
None known.
----------------------------------------------------------------------------
| |
| |