class · System.Runtime.InteropServices

CStrings

internal class System.Runtime.InteropServices.CStrings : System.Any

Temporary C strings: what the compiler calls around an imported function that takes strings.

Kind
class
Namespace
System.Runtime.InteropServices
Assembly
System.Core
Access
internal, static, abstract
Source file
Interop.ant

Inheritance

Base classes
Any CStrings

Methods

static method Allocate(bytes: i64) -> u8*
#

static

static method Release(block: u8*) -> void
#

static

static method Utf8(text: System.String<u8>) -> u8*
#

static

A null-terminated UTF-8 copy of text (Free gives it back).

static method Utf16(text: System.String<u16>) -> u16*
#

static

A null-terminated UTF-16 copy of text (Free16 gives it back).

static method Utf8Into(text: System.String<u8>, buffer: u8*, capacity: i32) -> bool
#

static

text null-terminated into buffer (capacity units) when it fits: whether it did.

static method Utf16Into(text: System.String<u16>, buffer: u16*, capacity: i32) -> bool
#

static

static method Free(block: u8*) -> void
#

static

static method Free16(block: u16*) -> void
#

static

static method Length8(text: u8*) -> i32
#

static

How many units come before the first 0.

static method Length16(text: u16*) -> i32
#

static

Inherited members (5)

Source

CStrings as Larva HIR, decompiled from its Larva HIR.

System.Runtime.InteropServices.CStrings.hir
// Temporary C strings: what the compiler calls around an imported function that takes strings.
internal class System.Runtime.InteropServices.CStrings : System.Any
{
    static method Allocate(bytes: i64) -> u8*
    static method Release(block: u8*) -> void
    // A null-terminated UTF-8 copy of `text` (Free gives it back).
    static method Utf8(text: System.String<u8>) -> u8*
    // A null-terminated UTF-16 copy of `text` (Free16 gives it back).
    static method Utf16(text: System.String<u16>) -> u16*
    // `text` null-terminated into `buffer` (`capacity` units) when it fits: whether it did.
    static method Utf8Into(text: System.String<u8>, buffer: u8*, capacity: i32) -> bool
    static method Utf16Into(text: System.String<u16>, buffer: u16*, capacity: i32) -> bool
    static method Free(block: u8*) -> void
    static method Free16(block: u16*) -> void
    // How many units come before the first 0.
    static method Length8(text: u8*) -> i32
    static method Length16(text: u16*) -> i32
}
Esc