| strjoin |
(Array items [, String sep]) |
yoix.string |
| |
Returns the string obtained by concatenating the elements in the
items
array and including
sep,
when supplied, between each pair of elements.
The result will be
NULL
if
items
is
NULL.
If an array item is not a
String,
it is converted to a
String
in the manner of
toString
before the join operation is performed.
Undefined elements in the
items
array are silently ignored.
| |
| Example: |
The program,
import yoix.stdio.*;
import yoix.string.*;
String s1 = "abcdefghij";
String s2 = strjoin(strsplit(s1, ""), "\n ");
printf("s1=%s\ns2=%s\n", s1, s2);
prints
s1=abcdefghij
s2=a
b
c
d
e
f
g
h
i
j
on standard output.
| | |
| Return: |
String
| | |
| See Also: |
csvsplit,
linesplit,
strcasecmp,
strcat,
strchr,
strcmp,
strcpy,
strcspn,
strdel,
strdup,
strfmt,
strins,
strlen,
strncasecmp,
strncat,
strncmp,
strncpy,
strpbrk,
strrchr,
strrstr,
strsplit,
strspn,
strstr,
strtok
|
|
Yoix is a registered trademark of AT&T Intellectual Property.
|