Next: Mixing with C++, Previous: Methods, Up: About CNI [Contents][Index]
CNI provides a number of utility functions for
working with Java Java String
objects.
The names and interfaces are analogous to those of JNI.
Returns a Java String
object with characters from the array of
Unicode characters chars up to the index len in that array.
Returns a Java String
made up of len bytes from bytes.
As above but the length of the String
is strlen(bytes)
.
Returns a String
which is made up of the UTF encoded characters
present in the C string bytes.
Returns a pointer to an array of characters making up the String
str.
Returns the number of bytes required to encode the contents of the
String
str in UTF-8.
Puts the UTF-8 encoding of a region of the String
str into
the buffer buf
. The region to fetch is marked by start and len.
Note that buf is a buffer, not a C string. It is not null terminated.