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
-
AnyCStrings
Methods
static method Utf8(text: System.String<u8>) -> u8*
#
A null-terminated UTF-8 copy of text (Free gives it back).
static method Utf16(text: System.String<u16>) -> u16*
#
A null-terminated UTF-16 copy of text (Free16 gives it back).
text null-terminated into buffer (capacity units) when it fits: whether it did.
How many units come before the first 0.
Inherited members (5)
GetTypemethod from AnyUndescribedmethod from AnyToStringmethod from AnyHashmethod from Anydestroymethod from Any
Source
CStrings as Larva HIR, decompiled from its Larva 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
}