Table of Contents

Operator implicit operator

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

implicit operator string(LazyEncodedString)

Implicit cast to a string via ToString()

public static implicit operator string(LazyEncodedString self)

Parameters

self LazyEncodedString

instance to cast

Returns

string

implicit operator ReadOnlySpan<byte>(LazyEncodedString)

Implicit cast to a span via ToReadOnlySpan(bool)

public static implicit operator ReadOnlySpan<byte>(LazyEncodedString self)

Parameters

self LazyEncodedString

instance to cast

Returns

ReadOnlySpan<byte>

Remarks

The resulting span is a view of the characters that does NOT include the terminating 0

implicit operator LazyEncodedString?(string?)

Convenient implicit conversion of a managed string into a Lazily encoded string

public static implicit operator LazyEncodedString?(string? managed)

Parameters

managed string

managed string to wrap with lazy encoding support

Returns

LazyEncodedString

implicit operator LazyEncodedString(ReadOnlySpan<byte>)

Convenient implicit conversion of a managed string into a Lazily encoded string

public static implicit operator LazyEncodedString(ReadOnlySpan<byte> utf8Data)

Parameters

utf8Data ReadOnlySpan<byte>

Span of UTF8 characters to wrap with lazy encoding support

Returns

LazyEncodedString