UTF8String

org.scalajs.ir.UTF8String$
See theUTF8String companion class
object UTF8String

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
UTF8String.type

Members list

Value members

Concrete methods

def apply(bytes: Array[Byte]): UTF8String

Creates a UTF-8 string from a byte array.

Creates a UTF-8 string from a byte array.

The input byte array will be copied to ensure the immutability of UTF8String.

Attributes

Throws
java.lang.IllegalArgumentException

if the input byte array is not a valid UTF-8 string

def apply(str: String): UTF8String

Creates a UTF-8 string from a string.

Creates a UTF-8 string from a string.

Attributes

Throws
java.lang.IllegalArgumentException

if the input string is not a valid UTF-16 string, i.e., if it contains unpaired surrogates