Skip to content

Class Utf8

Namespace: Apogee.Interop
Assembly: Apogee.Interop.dll

UTF-8 strings at the native boundary: C strings in, C strings out.

public static class Utf8

Inheritance

object ← Utf8

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Methods

FromPointer(byte*)

The string a zero-terminated C string holds, or null for a null pointer.

public static string? FromPointer(byte* text)

Parameters

text byte*

Returns

string?

ToZeroTerminated(string)

text as zero-terminated UTF-8 bytes; pin the array (fixed) to pass it to C.

public static byte[] ToZeroTerminated(string text)

Parameters

text string

Returns

byte[]