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 Library Reference - <u>synopsis:</u> 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 );
    #include <wchar.h>
    wchar_t *wcsncat( wchar_t *dst,
                const wchar_t *src,
                      size_t n );
    #include <mbstring.h>
    unsigned char *_mbsncat( unsigned char *dst,
                       const unsigned char *src,
                             size_t n );
    unsigned char __far *_fmbsncat( unsigned char __far *dst,
                              const unsigned char __far *src,
                                    size_t n );

Description:
    The strncat function appends 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.

    The wcsncat function is a wide-character version of strncat that
    operates with wide-character strings.

    The _mbsncat function is a multibyte character version of strncat that
    operates with multibyte character strings.

    The _fmbsncat function is a data model independent form of the _mbsncat
    function that accepts far pointer arguments.  It is most useful in mixed
    memory model applications.

Returns:
    The strncat function returns the value of dst.

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, wcsncat is ANSI, _mbsncat is not
    ANSI, _fmbsncat is not ANSI

Systems:
     strncat - All, Netware

    _fstrncat - All
    wcsncat - All
    _mbsncat - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32
    _fmbsncat - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    strcat

See Also:

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