js_set_chsize(3)

NAME
js_set_chsize - change the character size that a given js_string object uses

SYNOPSIS
#include JsStr.h

int js_set_chsize(js_string *js, int size);

IMPORTANT
js_set_chsize is depricated; which means that one should not use this function. Future versions of the js_string library will not have this function.

DESCRIPTION
js_set_chsize changes the size of a single character in a given js_string object. You can use this function to set the number of octets a single character of a js_string uses. This is useful, for example, if you are using UNICODE and wish to use two octets to represent a single character.

ARGUMENTS
js is a pointer to the js_string object that you wish to change the character size for.

size is the number of octets a single character in a js_string object uses.

EXAMPLE
The following example code creates a js_string object, and makes a single character two octets long.

	js_string *foo;
	foo = js_create(256,1);
	js_set_chsize(foo,2);

RETURN VALUE
js_set_encode returns JS_SUCCESS on success, and JS_ERROR if it is not able to set the size for the js_string object.

BUGS
This function will return an error if either

1)  The js_string object is not zero-length.

2)  The currently maximum allowed length, in octets, is not evenly divisible by the number of octets for the desired new size.

These limitations need to be removed before this funciton is readily useful.

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