Unix and Linux Discussions Tagged with concatenate |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
1 |
4,894 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
4,923 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
2,002 |
Shell Programming and Scripting |
|
|
|
4 |
2,650 |
Shell Programming and Scripting |
|
|
|
5 |
2,084 |
Shell Programming and Scripting |
|
|
|
5 |
21,598 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
3,463 |
Shell Programming and Scripting |
|
|
|
7 |
4,325 |
UNIX for Dummies Questions & Answers |
|
|
|
10 |
9,154 |
UNIX for Dummies Questions & Answers |
|
|
|
13 |
52,654 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
2,028 |
Shell Programming and Scripting |
|
|
|
2 |
5,301 |
Shell Programming and Scripting |
|
|
|
1 |
12,441 |
Shell Programming and Scripting |
|
|
|
1 |
1,749 |
UNIX for Dummies Questions & Answers |
|
|
|
10 |
17,392 |
Shell Programming and Scripting |
|
|
|
2 |
3,584 |
Shell Programming and Scripting |
|
|
|
3 |
4,739 |
Shell Programming and Scripting |
|
|
|
7 |
7,455 |
Shell Programming and Scripting |
|
|
|
8 |
16,430 |
Shell Programming and Scripting |
|
|
|
3 |
8,693 |
Shell Programming and Scripting |
|
|
|
2 |
25,921 |
Shell Programming and Scripting |
|
|
|
4 |
2,807 |
Shell Programming and Scripting |
|
|
|
1 |
3,039 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
8,535 |
Shell Programming and Scripting |
|
|
|
9 |
7,155 |
UNIX for Advanced & Expert Users |
|
|
|
30 |
11,802 |
Shell Programming and Scripting |
|
|
|
7 |
9,340 |
Shell Programming and Scripting |
|
|
|
1 |
3,726 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
4,241 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
10,945 |
Shell Programming and Scripting |
STRACAT(3pub) C Programmer's Manual STRACAT(3pub)
NAME
stracat - concatenate many strings into an allocated memory block
SYNOPSIS
#include <publib.h>
char *stracat(const char *s, ...);
DESCRIPTION
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.
RETURN VALUE
stracat returns a pointer to the allocated block, or NULL if it could not be allocated.
EXAMPLE
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.)
SEE ALSO
publib(3), strcat(3)
AUTHOR
Lars Wirzenius (lars.wirzenius@helsinki.fi)
Publib C Programmer's Manual STRACAT(3pub)