Import sources from 2011-03-30 iso image
This commit is contained in:
commit
e5888a1ffd
7810 changed files with 2489717 additions and 0 deletions
17
sys/src/libString/s_append.c
Executable file
17
sys/src/libString/s_append.c
Executable file
|
@ -0,0 +1,17 @@
|
|||
#include <u.h>
|
||||
#include <libc.h>
|
||||
#include "String.h"
|
||||
|
||||
/* append a char array to a String */
|
||||
String *
|
||||
s_append(String *to, char *from)
|
||||
{
|
||||
if (to == 0)
|
||||
to = s_new();
|
||||
if (from == 0)
|
||||
return to;
|
||||
for(; *from; from++)
|
||||
s_putc(to, *from);
|
||||
s_terminate(to);
|
||||
return to;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue