GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
STRACAT(3) C Programmer's Manual STRACAT(3)

stracat - concatenate many strings into an allocated memory block

#include <publib.h>
char *stracat(const char *s, ...);

stracat will allocate a block of memory with malloc and concatenate all arguments strings into this block. The user is supposed to free the returned block. The end of the argument list is signalled by a null pointer.

stracat returns a pointer to the allocated block, or NULL if it could not be allocated.

To concatenate "hello, " and "world", one might say the following.


p = stracat("hello, ", "world", (char *)NULL); if (p != NULL) puts(p);
Please note that it is necessary to case NULL as in the example above, since there is no information about the type of the argument available in the prototype, and since an unadorned NULL might not be of the correct type. (See any good C reference book or the comp.lang.c FAQ for more information.)

publib(3), strcat(3)

Lars Wirzenius (lars.wirzenius@helsinki.fi)
C Programmer's Manual Publib

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.