Overslaan en naar de inhoud gaan

//ERDDAP/com.cohort.util/ScriptString2/stringToUtf8Bytes

stringToUtf8Bytes

[JVM]
open fun stringToUtf8Bytes(s: String): Array<Byte>

This returns the UTF-8 encoding of the string (or null if trouble). The inverse of this is utf8BytesToString. This won't throw an exception and returns ERROR (as bytes) if trouble.

Return

the byte[]. null in returns null. length=0 returns BAR_ZERO.