js_append(3)

NAME
js_append - append one js_string string after another js_string object

SYNOPSIS
#include JsStr.h

int js_append(js_string *toappend, js_string *target)

DESCRIPTION
js_append appends the string in the js_string object toappend after the end of the js_string object target.

ARGUMENTS
toappend is a pointer to the js_string object we will place after target. target is the js_string object that will be appended by the toappend string.

RETURN VALUE
js_append returns 0 on successful appending of the string, JS_ERROR otherwise.

EXAMPLE
The following example will give foo the string "1234567890":
	js_string *foo, *bar;
	foo = js_create(256,1);
	bar = js_create(256,1);
	js_str2js(foo,"12345",5,1);
	js_str2js(bar,"67890",5,1);
	js_append(bar,foo); /* foo is now "1234567890" */

AUTHOR
Sam Trenholme <kiwi-zttfryb@koala.samiam.org>