Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <string.h>
    char *strncat( char *dst, const char *src, size_t n );
    char __far *_fstrncat( char __far *dst,
                           const char __far *src,
                           size_t n );

Description:
    The strncat and _fstrncat functions append not more than n characters of
    the string pointed to by src to the end of the string pointed to by dst.
     The first character of src overwrites the null character at the end of
    dst.  A terminating null character is always appended to the result.

    The _fstrncat function is a data model independent form of the strncat
    function.  It accepts far pointer arguments and returns a far pointer.
     It is most useful in mixed memory model applications.

Returns:
    The strncat and _fstrncat functions return the value of dst.

See Also:
    strcat, _fstrcat

Example:
    #include <stdio.h>
    #include <string.h>

    char buffer[80];

    void main()
      {
        strcpy( buffer, "Hello " );
        strncat( buffer, "world", 8 );
        printf( "%s\n", buffer );
        strncat( buffer, "*************", 4 );
        printf( "%s\n", buffer );
      }

    produces the following:

    Hello world
    Hello world****

Classification:
    strncat is ANSI, _fstrncat is not ANSI

Systems:
     strncat - All

    _fstrncat - All

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson