Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>strncat() append specified number of characters to a string</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 strncat()               Append Specified Number of Characters to a String

 #include   <string.h>                   Required for declarations only

 char          *strncat(string1,string2,max);
 char          *string1;                 Destination string
 const char    *string2;                 Source string
 size_t         max;                     Number of characters to append

    strncat() copies the first 'max' characters of 'string2' to the end
    of 'string1', and then appends a null character.  No more than 'max'
    characters are appended to 'string1'; the length of 'string2' is used
    instead of 'max'if 'max' is greater than the length of 'string2'.

    Returns:    A pointer to 'string1'.

      Notes:    Be sure that 'string1' is declared large enough to hold
                'max' characters of 'string2'.

See Also: strcat()

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