CharMemoryExtensions
Assembly: ServiceStack.Text.dll
Declaration
public static class CharMemoryExtensions
Methods
IsNullOrEmpty(ReadOnlyMemory<Char>)
Declaration
public static bool IsNullOrEmpty(this ReadOnlyMemory<char> value)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
IsWhiteSpace(ReadOnlyMemory<Char>)
Declaration
public static bool IsWhiteSpace(this ReadOnlyMemory<char> value)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
IsNullOrWhiteSpace(ReadOnlyMemory<Char>)
Declaration
public static bool IsNullOrWhiteSpace(this ReadOnlyMemory<char> value)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
Advance(ReadOnlyMemory<Char>, Int32)
Declaration
public static ReadOnlyMemory<char> Advance(this ReadOnlyMemory<char> text, int to)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | text |
System.Int32 | to |
AdvancePastWhitespace(ReadOnlyMemory<Char>)
Declaration
public static ReadOnlyMemory<char> AdvancePastWhitespace(this ReadOnlyMemory<char> literal)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | literal |
AdvancePastChar(ReadOnlyMemory<Char>, Char)
Declaration
public static ReadOnlyMemory<char> AdvancePastChar(this ReadOnlyMemory<char> literal, char delim)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | literal |
System.Char | delim |
ParseBoolean(ReadOnlyMemory<Char>)
Declaration
public static bool ParseBoolean(this ReadOnlyMemory<char> value)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
TryParseBoolean(ReadOnlyMemory<Char>, out Boolean)
Declaration
public static bool TryParseBoolean(this ReadOnlyMemory<char> value, out bool result)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.Boolean | result |
TryParseDecimal(ReadOnlyMemory<Char>, out Decimal)
Declaration
public static bool TryParseDecimal(this ReadOnlyMemory<char> value, out decimal result)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.Decimal | result |
TryParseFloat(ReadOnlyMemory<Char>, out Single)
Declaration
public static bool TryParseFloat(this ReadOnlyMemory<char> value, out float result)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.Single | result |
TryParseDouble(ReadOnlyMemory<Char>, out Double)
Declaration
public static bool TryParseDouble(this ReadOnlyMemory<char> value, out double result)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.Double | result |
ParseDecimal(ReadOnlyMemory<Char>)
Declaration
public static decimal ParseDecimal(this ReadOnlyMemory<char> value)
Returns
System.Decimal
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
ParseFloat(ReadOnlyMemory<Char>)
Declaration
public static float ParseFloat(this ReadOnlyMemory<char> value)
Returns
System.Single
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
ParseDouble(ReadOnlyMemory<Char>)
Declaration
public static double ParseDouble(this ReadOnlyMemory<char> value)
Returns
System.Double
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
ParseSByte(ReadOnlyMemory<Char>)
Declaration
public static sbyte ParseSByte(this ReadOnlyMemory<char> value)
Returns
System.SByte
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
ParseByte(ReadOnlyMemory<Char>)
Declaration
public static byte ParseByte(this ReadOnlyMemory<char> value)
Returns
System.Byte
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
ParseInt16(ReadOnlyMemory<Char>)
Declaration
public static short ParseInt16(this ReadOnlyMemory<char> value)
Returns
System.Int16
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
ParseUInt16(ReadOnlyMemory<Char>)
Declaration
public static ushort ParseUInt16(this ReadOnlyMemory<char> value)
Returns
System.UInt16
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
ParseInt32(ReadOnlyMemory<Char>)
Declaration
public static int ParseInt32(this ReadOnlyMemory<char> value)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
ParseUInt32(ReadOnlyMemory<Char>)
Declaration
public static uint ParseUInt32(this ReadOnlyMemory<char> value)
Returns
System.UInt32
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
ParseInt64(ReadOnlyMemory<Char>)
Declaration
public static long ParseInt64(this ReadOnlyMemory<char> value)
Returns
System.Int64
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
ParseUInt64(ReadOnlyMemory<Char>)
Declaration
public static ulong ParseUInt64(this ReadOnlyMemory<char> value)
Returns
System.UInt64
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
ParseGuid(ReadOnlyMemory<Char>)
Declaration
public static Guid ParseGuid(this ReadOnlyMemory<char> value)
Returns
System.Guid
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
LeftPart(ReadOnlyMemory<Char>, Char)
Declaration
public static ReadOnlyMemory<char> LeftPart(this ReadOnlyMemory<char> strVal, char needle)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | strVal |
System.Char | needle |
LeftPart(ReadOnlyMemory<Char>, String)
Declaration
public static ReadOnlyMemory<char> LeftPart(this ReadOnlyMemory<char> strVal, string needle)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | strVal |
System.String | needle |
RightPart(ReadOnlyMemory<Char>, Char)
Declaration
public static ReadOnlyMemory<char> RightPart(this ReadOnlyMemory<char> strVal, char needle)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | strVal |
System.Char | needle |
RightPart(ReadOnlyMemory<Char>, String)
Declaration
public static ReadOnlyMemory<char> RightPart(this ReadOnlyMemory<char> strVal, string needle)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | strVal |
System.String | needle |
LastLeftPart(ReadOnlyMemory<Char>, Char)
Declaration
public static ReadOnlyMemory<char> LastLeftPart(this ReadOnlyMemory<char> strVal, char needle)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | strVal |
System.Char | needle |
LastLeftPart(ReadOnlyMemory<Char>, String)
Declaration
public static ReadOnlyMemory<char> LastLeftPart(this ReadOnlyMemory<char> strVal, string needle)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | strVal |
System.String | needle |
LastRightPart(ReadOnlyMemory<Char>, Char)
Declaration
public static ReadOnlyMemory<char> LastRightPart(this ReadOnlyMemory<char> strVal, char needle)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | strVal |
System.Char | needle |
LastRightPart(ReadOnlyMemory<Char>, String)
Declaration
public static ReadOnlyMemory<char> LastRightPart(this ReadOnlyMemory<char> strVal, string needle)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | strVal |
System.String | needle |
TryReadLine(ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>, ref Int32)
Declaration
public static bool TryReadLine(this ReadOnlyMemory<char> text, out ReadOnlyMemory<char> line, ref int startIndex)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | text |
ReadOnlyMemory<System.Char> | line |
System.Int32 | startIndex |
TryReadPart(ReadOnlyMemory<Char>, ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>, ref Int32)
Declaration
public static bool TryReadPart(this ReadOnlyMemory<char> text, ReadOnlyMemory<char> needle, out ReadOnlyMemory<char> part, ref int startIndex)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | text |
ReadOnlyMemory<System.Char> | needle |
ReadOnlyMemory<System.Char> | part |
System.Int32 | startIndex |
SplitOnFirst(ReadOnlyMemory<Char>, Char, out ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>)
Declaration
public static void SplitOnFirst(this ReadOnlyMemory<char> strVal, char needle, out ReadOnlyMemory<char> first, out ReadOnlyMemory<char> last)
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | strVal |
System.Char | needle |
ReadOnlyMemory<System.Char> | first |
ReadOnlyMemory<System.Char> | last |
SplitOnFirst(ReadOnlyMemory<Char>, ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>)
Declaration
public static void SplitOnFirst(this ReadOnlyMemory<char> strVal, ReadOnlyMemory<char> needle, out ReadOnlyMemory<char> first, out ReadOnlyMemory<char> last)
Parameters
Type | Name |
---|
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>)
Declaration
public static void SplitOnLast(this ReadOnlyMemory<char> strVal, char needle, out ReadOnlyMemory<char> first, out ReadOnlyMemory<char> last)
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | strVal |
System.Char | needle |
ReadOnlyMemory<System.Char> | first |
ReadOnlyMemory<System.Char> | last |
SplitOnLast(ReadOnlyMemory<Char>, ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>, out ReadOnlyMemory<Char>)
Declaration
public static void SplitOnLast(this ReadOnlyMemory<char> strVal, ReadOnlyMemory<char> needle, out ReadOnlyMemory<char> first, out ReadOnlyMemory<char> last)
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | strVal |
ReadOnlyMemory<System.Char> | needle |
ReadOnlyMemory<System.Char> | first |
ReadOnlyMemory<System.Char> | last |
IndexOf(ReadOnlyMemory<Char>, Char)
Declaration
public static int IndexOf(this ReadOnlyMemory<char> value, char needle)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.Char | needle |
IndexOf(ReadOnlyMemory<Char>, String)
Declaration
public static int IndexOf(this ReadOnlyMemory<char> value, string needle)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.String | needle |
IndexOf(ReadOnlyMemory<Char>, Char, Int32)
Declaration
public static int IndexOf(this ReadOnlyMemory<char> value, char needle, int start)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.Char | needle |
System.Int32 | start |
IndexOf(ReadOnlyMemory<Char>, String, Int32)
Declaration
public static int IndexOf(this ReadOnlyMemory<char> value, string needle, int start)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.String | needle |
System.Int32 | start |
LastIndexOf(ReadOnlyMemory<Char>, Char)
Declaration
public static int LastIndexOf(this ReadOnlyMemory<char> value, char needle)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.Char | needle |
LastIndexOf(ReadOnlyMemory<Char>, String)
Declaration
public static int LastIndexOf(this ReadOnlyMemory<char> value, string needle)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.String | needle |
LastIndexOf(ReadOnlyMemory<Char>, Char, Int32)
Declaration
public static int LastIndexOf(this ReadOnlyMemory<char> value, char needle, int start)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.Char | needle |
System.Int32 | start |
LastIndexOf(ReadOnlyMemory<Char>, String, Int32)
Declaration
public static int LastIndexOf(this ReadOnlyMemory<char> value, string needle, int start)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.String | needle |
System.Int32 | start |
StartsWith(ReadOnlyMemory<Char>, String)
Declaration
public static bool StartsWith(this ReadOnlyMemory<char> value, string other)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.String | other |
StartsWith(ReadOnlyMemory<Char>, String, StringComparison)
Declaration
public static bool StartsWith(this ReadOnlyMemory<char> value, string other, StringComparison comparison)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.String | other |
System.StringComparison | comparison |
EndsWith(ReadOnlyMemory<Char>, String)
Declaration
public static bool EndsWith(this ReadOnlyMemory<char> value, string other)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.String | other |
EndsWith(ReadOnlyMemory<Char>, String, StringComparison)
Declaration
public static bool EndsWith(this ReadOnlyMemory<char> value, string other, StringComparison comparison)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.String | other |
System.StringComparison | comparison |
EqualsOrdinal(ReadOnlyMemory<Char>, String)
Declaration
public static bool EqualsOrdinal(this ReadOnlyMemory<char> value, string other)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.String | other |
EqualsOrdinal(ReadOnlyMemory<Char>, ReadOnlyMemory<Char>)
Declaration
public static bool EqualsOrdinal(this ReadOnlyMemory<char> value, ReadOnlyMemory<char> other)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
ReadOnlyMemory<System.Char> | other |
SafeSlice(ReadOnlyMemory<Char>, Int32)
Declaration
public static ReadOnlyMemory<char> SafeSlice(this ReadOnlyMemory<char> value, int startIndex)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.Int32 | startIndex |
SafeSlice(ReadOnlyMemory<Char>, Int32, Int32)
Declaration
public static ReadOnlyMemory<char> SafeSlice(this ReadOnlyMemory<char> value, int startIndex, int length)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.Int32 | startIndex |
System.Int32 | length |
SubstringWithEllipsis(ReadOnlyMemory<Char>, Int32, Int32)
Declaration
public static string SubstringWithEllipsis(this ReadOnlyMemory<char> value, int startIndex, int length)
Returns
System.String
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | value |
System.Int32 | startIndex |
System.Int32 | length |
ToUtf8(ReadOnlyMemory<Char>)
Declaration
public static ReadOnlyMemory<byte> ToUtf8(this ReadOnlyMemory<char> chars)
Returns
ReadOnlyMemory<System.Byte>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Char> | chars |
FromUtf8(ReadOnlyMemory<Byte>)
Declaration
public static ReadOnlyMemory<char> FromUtf8(this ReadOnlyMemory<byte> bytes)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlyMemory<System.Byte> | bytes |