[Previous]
[Contents]
[Next]

strcat(), _fstrcat()

concatenate two strings

Synopsis:

#include <string.h>

char *strcat( char *dst,
              const char *src );
char __far *_fstrcat( char __far *dst,
                      const char __far *src );

Description:

The strcat() function appends a copy of the string pointed to by src (including the terminating null character) to the end of the string pointed to by dst. The first character of src overwrites the null character at the end of dst.

The _fstrcat() function is a data-model-independent form of the strcat() function. It accepts far pointer arguments, and returns a far pointer. It is most useful in mixed memory model applications.

Returns:

The value of dst.

Examples:

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

void main()
  {
    char buffer[80];

    strcpy( buffer, "Hello " );
    strcat( buffer, "world" );
    printf( "%s\n", buffer );
  }

produces the output:

Hello world

Classification:

strcat() is ANSI; _fstrcat() is WATCOM.

Safety:
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

strncat()


[Previous]
[Contents]
[Next]