Skip to main content

CharMemoryExtensions

Assembly: ServiceStack.Text.dll
View Source
Declaration
public static class CharMemoryExtensions

Methods

IsNullOrEmpty(ReadOnlyMemory<Char>)

View Source
Declaration
public static bool IsNullOrEmpty(this ReadOnlyMemory<char> value)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>value

IsWhiteSpace(ReadOnlyMemory<Char>)

View Source
Declaration
public static bool IsWhiteSpace(this ReadOnlyMemory<char> value)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>value

IsNullOrWhiteSpace(ReadOnlyMemory<Char>)

View Source
Declaration
public static bool IsNullOrWhiteSpace(this ReadOnlyMemory<char> value)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>value

Advance(ReadOnlyMemory<Char>, Int32)

View Source
Declaration
public static ReadOnlyMemory<char> Advance(this ReadOnlyMemory<char> text, int to)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Char>text
System.Int32to

AdvancePastWhitespace(ReadOnlyMemory<Char>)

View Source
Declaration
public static ReadOnlyMemory<char> AdvancePastWhitespace(this ReadOnlyMemory<char> literal)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Char>literal

AdvancePastChar(ReadOnlyMemory<Char>, Char)

View Source
Declaration
public static ReadOnlyMemory<char> AdvancePastChar(this ReadOnlyMemory<char> literal, char delim)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Char>literal
System.Chardelim

ParseBoolean(ReadOnlyMemory<Char>)

View Source
Declaration
public static bool ParseBoolean(this ReadOnlyMemory<char> value)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>value

TryParseBoolean(ReadOnlyMemory<Char>, out Boolean)

View Source
Declaration
public static bool TryParseBoolean(this ReadOnlyMemory<char> value, out bool result)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Booleanresult

TryParseDecimal(ReadOnlyMemory<Char>, out Decimal)

View Source
Declaration
public static bool TryParseDecimal(this ReadOnlyMemory<char> value, out decimal result)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Decimalresult

TryParseFloat(ReadOnlyMemory<Char>, out Single)

View Source
Declaration
public static bool TryParseFloat(this ReadOnlyMemory<char> value, out float result)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Singleresult

TryParseDouble(ReadOnlyMemory<Char>, out Double)

View Source
Declaration
public static bool TryParseDouble(this ReadOnlyMemory<char> value, out double result)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Doubleresult

ParseDecimal(ReadOnlyMemory<Char>)

View Source
Declaration
public static decimal ParseDecimal(this ReadOnlyMemory<char> value)
Returns

System.Decimal

Parameters
TypeName
ReadOnlyMemory<System.Char>value

ParseFloat(ReadOnlyMemory<Char>)

View Source
Declaration
public static float ParseFloat(this ReadOnlyMemory<char> value)
Returns

System.Single

Parameters
TypeName
ReadOnlyMemory<System.Char>value

ParseDouble(ReadOnlyMemory<Char>)

View Source
Declaration
public static double ParseDouble(this ReadOnlyMemory<char> value)
Returns

System.Double

Parameters
TypeName
ReadOnlyMemory<System.Char>value

ParseSByte(ReadOnlyMemory<Char>)

View Source
Declaration
public static sbyte ParseSByte(this ReadOnlyMemory<char> value)
Returns

System.SByte

Parameters
TypeName
ReadOnlyMemory<System.Char>value

ParseByte(ReadOnlyMemory<Char>)

View Source
Declaration
public static byte ParseByte(this ReadOnlyMemory<char> value)
Returns

System.Byte

Parameters
TypeName
ReadOnlyMemory<System.Char>value

ParseInt16(ReadOnlyMemory<Char>)

View Source
Declaration
public static short ParseInt16(this ReadOnlyMemory<char> value)
Returns

System.Int16

Parameters
TypeName
ReadOnlyMemory<System.Char>value

ParseUInt16(ReadOnlyMemory<Char>)

View Source
Declaration
public static ushort ParseUInt16(this ReadOnlyMemory<char> value)
Returns

System.UInt16

Parameters
TypeName
ReadOnlyMemory<System.Char>value

ParseInt32(ReadOnlyMemory<Char>)

View Source
Declaration
public static int ParseInt32(this ReadOnlyMemory<char> value)
Returns

System.Int32

Parameters
TypeName
ReadOnlyMemory<System.Char>value

ParseUInt32(ReadOnlyMemory<Char>)

View Source
Declaration
public static uint ParseUInt32(this ReadOnlyMemory<char> value)
Returns

System.UInt32

Parameters
TypeName
ReadOnlyMemory<System.Char>value

ParseInt64(ReadOnlyMemory<Char>)

View Source
Declaration
public static long ParseInt64(this ReadOnlyMemory<char> value)
Returns

System.Int64

Parameters
TypeName
ReadOnlyMemory<System.Char>value

ParseUInt64(ReadOnlyMemory<Char>)

View Source
Declaration
public static ulong ParseUInt64(this ReadOnlyMemory<char> value)
Returns

System.UInt64

Parameters
TypeName
ReadOnlyMemory<System.Char>value

ParseGuid(ReadOnlyMemory<Char>)

View Source
Declaration
public static Guid ParseGuid(this ReadOnlyMemory<char> value)
Returns

System.Guid

Parameters
TypeName
ReadOnlyMemory<System.Char>value

LeftPart(ReadOnlyMemory<Char>, Char)

View Source
Declaration
public static ReadOnlyMemory<char> LeftPart(this ReadOnlyMemory<char> strVal, char needle)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Char>strVal
System.Charneedle

LeftPart(ReadOnlyMemory<Char>, String)

View Source
Declaration
public static ReadOnlyMemory<char> LeftPart(this ReadOnlyMemory<char> strVal, string needle)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Char>strVal
System.Stringneedle

RightPart(ReadOnlyMemory<Char>, Char)

View Source
Declaration
public static ReadOnlyMemory<char> RightPart(this ReadOnlyMemory<char> strVal, char needle)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Char>strVal
System.Charneedle

RightPart(ReadOnlyMemory<Char>, String)

View Source
Declaration
public static ReadOnlyMemory<char> RightPart(this ReadOnlyMemory<char> strVal, string needle)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Char>strVal
System.Stringneedle

LastLeftPart(ReadOnlyMemory<Char>, Char)

View Source
Declaration
public static ReadOnlyMemory<char> LastLeftPart(this ReadOnlyMemory<char> strVal, char needle)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Char>strVal
System.Charneedle

LastLeftPart(ReadOnlyMemory<Char>, String)

View Source
Declaration
public static ReadOnlyMemory<char> LastLeftPart(this ReadOnlyMemory<char> strVal, string needle)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Char>strVal
System.Stringneedle

LastRightPart(ReadOnlyMemory<Char>, Char)

View Source
Declaration
public static ReadOnlyMemory<char> LastRightPart(this ReadOnlyMemory<char> strVal, char needle)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Char>strVal
System.Charneedle

LastRightPart(ReadOnlyMemory<Char>, String)

View Source
Declaration
public static ReadOnlyMemory<char> LastRightPart(this ReadOnlyMemory<char> strVal, string needle)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Char>strVal
System.Stringneedle

TryReadLine(ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>, ref Int32)

View Source
Declaration
public static bool TryReadLine(this ReadOnlyMemory<char> text, out ReadOnlyMemory<char> line, ref int startIndex)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>text
ReadOnlyMemory<System.Char>line
System.Int32startIndex

TryReadPart(ReadOnlyMemory<Char>, ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>, ref Int32)

View Source
Declaration
public static bool TryReadPart(this ReadOnlyMemory<char> text, ReadOnlyMemory<char> needle, out ReadOnlyMemory<char> part, ref int startIndex)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>text
ReadOnlyMemory<System.Char>needle
ReadOnlyMemory<System.Char>part
System.Int32startIndex

SplitOnFirst(ReadOnlyMemory<Char>, Char, out ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>)

View Source
Declaration
public static void SplitOnFirst(this ReadOnlyMemory<char> strVal, char needle, out ReadOnlyMemory<char> first, out ReadOnlyMemory<char> last)
Parameters
TypeName
ReadOnlyMemory<System.Char>strVal
System.Charneedle
ReadOnlyMemory<System.Char>first
ReadOnlyMemory<System.Char>last

SplitOnFirst(ReadOnlyMemory<Char>, ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>)

View Source
Declaration
public static void SplitOnFirst(this ReadOnlyMemory<char> strVal, ReadOnlyMemory<char> needle, out ReadOnlyMemory<char> first, out ReadOnlyMemory<char> last)
Parameters
TypeName
ReadOnlyMemory<System.Char>strVal
ReadOnlyMemory<System.Char>needle
ReadOnlyMemory<System.Char>first
ReadOnlyMemory<System.Char>last

SplitOnLast(ReadOnlyMemory<Char>, Char, out ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>)

View Source
Declaration
public static void SplitOnLast(this ReadOnlyMemory<char> strVal, char needle, out ReadOnlyMemory<char> first, out ReadOnlyMemory<char> last)
Parameters
TypeName
ReadOnlyMemory<System.Char>strVal
System.Charneedle
ReadOnlyMemory<System.Char>first
ReadOnlyMemory<System.Char>last

SplitOnLast(ReadOnlyMemory<Char>, ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>)

View Source
Declaration
public static void SplitOnLast(this ReadOnlyMemory<char> strVal, ReadOnlyMemory<char> needle, out ReadOnlyMemory<char> first, out ReadOnlyMemory<char> last)
Parameters
TypeName
ReadOnlyMemory<System.Char>strVal
ReadOnlyMemory<System.Char>needle
ReadOnlyMemory<System.Char>first
ReadOnlyMemory<System.Char>last

IndexOf(ReadOnlyMemory<Char>, Char)

View Source
Declaration
public static int IndexOf(this ReadOnlyMemory<char> value, char needle)
Returns

System.Int32

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Charneedle

IndexOf(ReadOnlyMemory<Char>, String)

View Source
Declaration
public static int IndexOf(this ReadOnlyMemory<char> value, string needle)
Returns

System.Int32

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Stringneedle

IndexOf(ReadOnlyMemory<Char>, Char, Int32)

View Source
Declaration
public static int IndexOf(this ReadOnlyMemory<char> value, char needle, int start)
Returns

System.Int32

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Charneedle
System.Int32start

IndexOf(ReadOnlyMemory<Char>, String, Int32)

View Source
Declaration
public static int IndexOf(this ReadOnlyMemory<char> value, string needle, int start)
Returns

System.Int32

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Stringneedle
System.Int32start

LastIndexOf(ReadOnlyMemory<Char>, Char)

View Source
Declaration
public static int LastIndexOf(this ReadOnlyMemory<char> value, char needle)
Returns

System.Int32

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Charneedle

LastIndexOf(ReadOnlyMemory<Char>, String)

View Source
Declaration
public static int LastIndexOf(this ReadOnlyMemory<char> value, string needle)
Returns

System.Int32

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Stringneedle

LastIndexOf(ReadOnlyMemory<Char>, Char, Int32)

View Source
Declaration
public static int LastIndexOf(this ReadOnlyMemory<char> value, char needle, int start)
Returns

System.Int32

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Charneedle
System.Int32start

LastIndexOf(ReadOnlyMemory<Char>, String, Int32)

View Source
Declaration
public static int LastIndexOf(this ReadOnlyMemory<char> value, string needle, int start)
Returns

System.Int32

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Stringneedle
System.Int32start

StartsWith(ReadOnlyMemory<Char>, String)

View Source
Declaration
public static bool StartsWith(this ReadOnlyMemory<char> value, string other)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Stringother

StartsWith(ReadOnlyMemory<Char>, String, StringComparison)

View Source
Declaration
public static bool StartsWith(this ReadOnlyMemory<char> value, string other, StringComparison comparison)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Stringother
System.StringComparisoncomparison

EndsWith(ReadOnlyMemory<Char>, String)

View Source
Declaration
public static bool EndsWith(this ReadOnlyMemory<char> value, string other)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Stringother

EndsWith(ReadOnlyMemory<Char>, String, StringComparison)

View Source
Declaration
public static bool EndsWith(this ReadOnlyMemory<char> value, string other, StringComparison comparison)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Stringother
System.StringComparisoncomparison

EqualsOrdinal(ReadOnlyMemory<Char>, String)

View Source
Declaration
public static bool EqualsOrdinal(this ReadOnlyMemory<char> value, string other)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Stringother

EqualsOrdinal(ReadOnlyMemory<Char>, ReadOnlyMemory<Char>)

View Source
Declaration
public static bool EqualsOrdinal(this ReadOnlyMemory<char> value, ReadOnlyMemory<char> other)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>value
ReadOnlyMemory<System.Char>other

SafeSlice(ReadOnlyMemory<Char>, Int32)

View Source
Declaration
public static ReadOnlyMemory<char> SafeSlice(this ReadOnlyMemory<char> value, int startIndex)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Int32startIndex

SafeSlice(ReadOnlyMemory<Char>, Int32, Int32)

View Source
Declaration
public static ReadOnlyMemory<char> SafeSlice(this ReadOnlyMemory<char> value, int startIndex, int length)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Int32startIndex
System.Int32length

SubstringWithEllipsis(ReadOnlyMemory<Char>, Int32, Int32)

View Source
Declaration
public static string SubstringWithEllipsis(this ReadOnlyMemory<char> value, int startIndex, int length)
Returns

System.String

Parameters
TypeName
ReadOnlyMemory<System.Char>value
System.Int32startIndex
System.Int32length

ToUtf8(ReadOnlyMemory<Char>)

View Source
Declaration
public static ReadOnlyMemory<byte> ToUtf8(this ReadOnlyMemory<char> chars)
Returns

ReadOnlyMemory<System.Byte>

Parameters
TypeName
ReadOnlyMemory<System.Char>chars

FromUtf8(ReadOnlyMemory<Byte>)

View Source
Declaration
public static ReadOnlyMemory<char> FromUtf8(this ReadOnlyMemory<byte> bytes)
Returns

ReadOnlyMemory<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Byte>bytes