class · System.Text

UTF8Encoding

public class System.Text.UTF8Encoding : System.Any
Kind
class
Namespace
System.Text
Assembly
System.Core
Access
public, final
Source file
Encoding.ant

Inheritance

Base classes
Any UTF8Encoding

Methods

method GetByteCount(text: System.String<u8>) -> i32
#

How many bytes text takes in UTF-8 (a str is UTF-8 already: its length).

method GetBytes(text: System.String<u8>) -> u8[]
#

The bytes of text (a copy: strings do not change).

method GetString(bytes: u8[]) -> System.String<u8>
#
method GetString(bytes: u8[], start: i32, count: i32) -> System.String<u8>
#

The text of count bytes from start (sequences that are not UTF-8 become U+FFFD).

Private and internal members (1)

static method IsValid(bytes: u8[], start: i32, count: i32) -> bool
#

private static

Whether count bytes from start are well-formed UTF-8.

Inherited members (5)

Source

UTF8Encoding as Larva HIR, decompiled from its Larva HIR.

System.Text.UTF8Encoding.hir
public class System.Text.UTF8Encoding : System.Any
{
    // Whether `count` bytes from `start` are well-formed UTF-8.
    static method IsValid(bytes: u8[], start: i32, count: i32) -> bool
    // How many bytes `text` takes in UTF-8 (a str is UTF-8 already: its length).
    method GetByteCount(text: System.String<u8>) -> i32
    // The bytes of `text` (a copy: strings do not change).
    method GetBytes(text: System.String<u8>) -> u8[]
    method GetString(bytes: u8[]) -> System.String<u8>
    // The text of `count` bytes from `start` (sequences that are not UTF-8 become U+FFFD).
    method GetString(bytes: u8[], start: i32, count: i32) -> System.String<u8>
}
Esc