js_copy(3)

NAME
js_copy - copy one js_string to another js_string object

SYNOPSIS
#include JsStr.h

int js_copy(js_string *src, js_string *dest)

DESCRIPTION
js_copy copys the js_string object src to the js_string object dest.

ARGUMENTS
src is the source js_string object, the string we copy.

dest is the js_string object we copy over.

RETURN VALUE
js_copy returns JS_SUCCESS on successful copying of the string, JS_ERROR otherwise.

EXAMPLE
The following example will give bar the string "1234567890":

	js_string *foo, *bar;
	foo = js_create(256,1);
	bar = js_create(256,1);
	js_str2js(foo,"1234567890",10,1);
	js_copy(foo,bar); /* bar is now "1234567890" */

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