Scoop API

scoop:scoop.platform:0.1.0

OsString

class OsString

source · line 7
public
public class OsString private constructor(private val bytes: Array<Byte>) : Equals<OsString>, Hash

An immutable snapshot of operating-system bytes. It can represent names that are not valid UTF-8; decoding policy is explicit.

Extensions

function decodeUtf8

source · line 22
public
public fun decodeUtf8(): String

Decodes the stored bytes as strict UTF-8, rejecting malformed encoding.

function toUtf16

source · line 17
public
public fun toUtf16(): Array<UShort>

Copies the UTF-16 code units represented by these UTF-8 or WTF-8 bytes, preserving unpaired surrogates. Malformed or noncanonical encoding throws CharacterCodingException.

function decodeUtf8Lossy

source · line 27
public
public fun decodeUtf8Lossy(): String

Decodes stored bytes with replacement for malformed UTF-8.

function toByteArray

source · line 11
public
public fun toByteArray(): Array<Byte>

Returns an independent copy of the stored native bytes.

function hash

source · line 42
public
public override fun hash(): Long

Hashes the stored bytes consistently with equality.

function display

source · line 32
public
public fun display(): String

Returns a lossy UTF-8 presentation suitable for displaying native names.