RAD Studio
ContentsIndex
PreviousUpNext
strcat, _mbscat, wcscat

Header File 

string.h, mbstring.h 

Category 

Memory and String Manipulation Routines, Inline Routines 

Prototype 

char *strcat(char *dest, const char *src); 

wchar_t *wcscat(wchar_t *dest, const wchar_t *src); 

unsigned char *_mbscat(unsigned char *dest, const unsigned char *src); 

Description 

Appends one string to another. 

strcat appends a copy of src to the end of dest. The length of the resulting string is strlen(dest) + strlen(src). 

Return Value 

strcat returns a pointer to the concatenated strings. 

Example  

#include <string.h>
#include <stdio.h>
int main(void)
{
   char destination[25];
   char *blank = " ", *c = "C++", *CodeGear = "CodeGear";
   strcpy(destination, CodeGear);
   strcat(destination, blank);
   strcat(destination, c);
   printf("%s\n", destination);
   return 0;
}

Portability

 
POSIX 
Win32 
ANSI C 
ANSI C++ 
strcat 
_mbscat 
 
 
 
wcscat 
 
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!