js_qstr2js(3)

NAME
js_qstr2js - convert a standard character array in to a js_string object

SYNOPSIS
#include JsStr.h

int js_qstr2js(js_string *js, char *string);

DESCRIPTION
js_qstr2js converts the string pointed to by string in to a js_string object. The js_string object in question needs to have been previously created, and any string currently in the js_string object will be cloberred.

ARGUMENTS
js is a pointer to the js_string object we will place the converted character array in.

string is the character array we are converting in to a js_string object.

js_str2js returns JS_SUCCESS on successful conversion of the string, JS_ERROR otherwise.

EXAMPLE
The following example creates a js_string object that is given the string "What's up doc?"

	js_string *foo;
	foo = js_create(256,1);
	js_qstr2js(foo,"What's up doc?");

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