asShortArray

Returns an array of type ShortArray, which is a view of this array where each element is a signed reinterpretation of the corresponding element of this array.

@ExperimentalUnsignedTypesinline fun UShortArray.asShortArray(): ShortArray(source)
@OptIn(ExperimentalUnsignedTypes::class)
fun main() {
    val uShorts: UShortArray = ushortArrayOf(0x0100u, 0xFF00u, 0x00FFu)
    val shorts: ShortArray = uShorts.asShortArray()
    println(shorts.joinToString(prefix = "[", postfix = "]"))
}

Source