modifyChars

context(env: JniEnv, placement: NativePlacement)
inline fun JString.modifyChars(onError: () -> Unit, block: (CArrayPointer<UShortVar>, isCopy: Boolean) -> Unit)(source)

Alias for safely retrieving a string's chars via getChars and releasing it with releaseChars.

Parameters

onError

code to execute if getChars fails.

block

code to execute with the retrieved chars and copy marker.