Language

JniEnvironment.Strings.GetStringChars(JniObjectReference, Boolean*) Method

Definition

Acquires read access to a Java string's UTF-16 code units.

public static char* GetStringChars(Java.Interop.JniObjectReference stringInstance, bool* isCopy);
static member GetStringChars : Java.Interop.JniObjectReference * nativeptr<bool> -> nativeptr<char>

Parameters

stringInstance
JniObjectReference

A valid JNI reference to the Java string.

isCopy
Boolean*

An optional output pointer that receives true when JNI returns a copied buffer, or false for direct access.

Returns

Char*

The character pointer to release with ReleaseStringChars, or a null pointer if JNI cannot provide access.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to