Show / Hide Table of Contents

Struct UTF8String

Inherited Members
ValueType.Equals(Object)
ValueType.GetHashCode()
ValueType.ToString()
Object.Equals(Object, Object)
Object.GetType()
Object.ReferenceEquals(Object, Object)
Namespace: WPIUtil
Assembly: FRC.WPIUtil.dll
Syntax
public struct UTF8String

Constructors

| Improve this Doc View Source

UTF8String(ReadOnlySpan<Char>)

Constructs a managed UTF8 string from a C# string

Declaration
public UTF8String(ReadOnlySpan<char> str)
Parameters
Type Name Description
System.ReadOnlySpan<Char> str
| Improve this Doc View Source

UTF8String(String)

Constructs a managed UTF8 string from a C# string

Declaration
public UTF8String(string str)
Parameters
Type Name Description
String str

Properties

| Improve this Doc View Source

Buffer

The buffer to the string. Do not modify this array. Null terminated

Declaration
public byte[] Buffer { get; }
Property Value
Type Description
Byte[]
| Improve this Doc View Source

Length

The length of this string, not including the null terminator

Declaration
public UIntPtr Length { get; }
Property Value
Type Description
UIntPtr

Methods

| Improve this Doc View Source

ReadUTF8String(Byte*)

Reads a UTF8 string from a null termincated native pointer

Declaration
public static string ReadUTF8String(byte *str)
Parameters
Type Name Description
Byte* str

The pointer to read from (must be null terminated)

Returns
Type Description
String

The managed string

| Improve this Doc View Source

ReadUTF8String(Byte*, Int32)

Reads a UTF8 string from a native pointer.

Declaration
public static string ReadUTF8String(byte *str, int size)
Parameters
Type Name Description
Byte* str

The pointer to read from

Int32 size

The length of the string

Returns
Type Description
String

The managed string

| Improve this Doc View Source

ReadUTF8String(Byte*, UIntPtr)

Reads a UTF8 string from a native pointer.

Declaration
public static string ReadUTF8String(byte *str, UIntPtr size)
Parameters
Type Name Description
Byte* str

The pointer to read from

UIntPtr size

The length of the string

Returns
Type Description
String

The managed string

  • Improve this Doc
  • View Source
Back to top Copyright © 2017 RobotDotNet