Table of Contents

Method ReadOnlySpanFromNullTerminated

Namespace
Ubiquity.NET.InteropHelpers
Assembly
Ubiquity.NET.InteropHelpers.dll

ReadOnlySpanFromNullTerminated(byte*)

Creates a ReadOnlySpan from a null terminated native string

public static ReadOnlySpan<byte> ReadOnlySpanFromNullTerminated(byte* nativePtr)

Parameters

nativePtr byte*

The null terminated string

Returns

ReadOnlySpan<byte>

ReadOnlySpan for the string

Remarks

This does NOT perform any encoding or decoding, just gets the span of the underlying native bytes.