modifyUTFChars
context(env: JniEnv, placement: NativePlacement)
inline fun JString.modifyUTFChars(onError: () -> Unit, block: (CArrayPointer<ByteVar>, isCopy: Boolean) -> Unit)(source)
inline fun JString.modifyUTFChars(onError: () -> Unit, block: (CArrayPointer<ByteVar>, isCopy: Boolean) -> Unit)(source)
Alias for safely retrieving a string's bytes via getUTFChars and releasing it with releaseUTFChars.
Parameters
onError
code to execute if getUTFChars fails.
block
code to execute with the retrieved bytes and copy marker.