js_length(3)

NAME
js_length - determine the length that a given js_string object has

SYNOPSIS
#include JsStr.h

int js_length(js_string *js);

DESCRIPTION
js_length determines the length that a given js_string object has. You can use this function to see how many units a js_string object has.

ARGUMENTS
js is a pointer to the js_string object that you wish to view the length of.

EXAMPLE
The following example code creates a js_string object, then gets the length of the string.
	js_string *foo;
	int len;
	foo = js_create(256,1);
	js_set_encode(foo,JS_US_ASCII);
	len = js_length(foo);

RETURN VALUE
js_length returns the length (in units) of the string in question. The size of a unit is determined by the unit_size of the js_string object in question. This function will return JS_ERROR if it is not able to get the length for the js_string object.

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