StringSpanExtensions
Helpful extensions on ReadOnlySpan<char>
Previous extensions on StringSegment available from: https://gist.github.com/mythz/9825689f0db7464d1d541cb62954614c
Assembly: ServiceStack.Text.dll
Declaration
public static class StringSpanExtensions
Methods
Value(ReadOnlySpan<Char>)
Returns null if Length == 0, string.Empty if value[0] == NonWidthWhitespace, otherwise returns value.ToString()
Declaration
public static string Value(this ReadOnlySpan<char> value)
Returns
System.String
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
IsNullOrEmpty(ReadOnlySpan<Char>)
Declaration
public static bool IsNullOrEmpty(this ReadOnlySpan<char> value)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
IsNullOrWhiteSpace(ReadOnlySpan<Char>)
Declaration
public static bool IsNullOrWhiteSpace(this ReadOnlySpan<char> value)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
GetChar(ReadOnlySpan<Char>, Int32)
Declaration
[Obsolete("Use value[index]")]
public static char GetChar(this ReadOnlySpan<char> value, int index)
Returns
System.Char
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | index |
Substring(ReadOnlySpan<Char>, Int32)
Declaration
public static string Substring(this ReadOnlySpan<char> value, int pos)
Returns
System.String
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | pos |
Substring(ReadOnlySpan<Char>, Int32, Int32)
Declaration
public static string Substring(this ReadOnlySpan<char> value, int pos, int length)
Returns
System.String
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | pos |
System.Int32 | length |
CompareIgnoreCase(ReadOnlySpan<Char>, ReadOnlySpan<Char>)
Declaration
public static bool CompareIgnoreCase(this ReadOnlySpan<char> value, ReadOnlySpan<char> text)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ReadOnlySpan<System.Char> | text |
FromCsvField(ReadOnlySpan<Char>)
Declaration
public static ReadOnlySpan<char> FromCsvField(this ReadOnlySpan<char> text)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | text |
ParseBoolean(ReadOnlySpan<Char>)
Declaration
public static bool ParseBoolean(this ReadOnlySpan<char> value)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
TryParseBoolean(ReadOnlySpan<Char>, out Boolean)
Declaration
public static bool TryParseBoolean(this ReadOnlySpan<char> value, out bool result)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Boolean | result |
TryParseDecimal(ReadOnlySpan<Char>, out Decimal)
Declaration
public static bool TryParseDecimal(this ReadOnlySpan<char> value, out decimal result)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Decimal | result |
TryParseFloat(ReadOnlySpan<Char>, out Single)
Declaration
public static bool TryParseFloat(this ReadOnlySpan<char> value, out float result)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Single | result |
TryParseDouble(ReadOnlySpan<Char>, out Double)
Declaration
public static bool TryParseDouble(this ReadOnlySpan<char> value, out double result)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Double | result |
ParseDecimal(ReadOnlySpan<Char>)
Declaration
public static decimal ParseDecimal(this ReadOnlySpan<char> value)
Returns
System.Decimal
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ParseDecimal(ReadOnlySpan<Char>, Boolean)
Declaration
public static decimal ParseDecimal(this ReadOnlySpan<char> value, bool allowThousands)
Returns
System.Decimal
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Boolean | allowThousands |
ParseFloat(ReadOnlySpan<Char>)
Declaration
public static float ParseFloat(this ReadOnlySpan<char> value)
Returns
System.Single
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ParseDouble(ReadOnlySpan<Char>)
Declaration
public static double ParseDouble(this ReadOnlySpan<char> value)
Returns
System.Double
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ParseSByte(ReadOnlySpan<Char>)
Declaration
public static sbyte ParseSByte(this ReadOnlySpan<char> value)
Returns
System.SByte
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ParseByte(ReadOnlySpan<Char>)
Declaration
public static byte ParseByte(this ReadOnlySpan<char> value)
Returns
System.Byte
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ParseInt16(ReadOnlySpan<Char>)
Declaration
public static short ParseInt16(this ReadOnlySpan<char> value)
Returns
System.Int16
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ParseUInt16(ReadOnlySpan<Char>)
Declaration
public static ushort ParseUInt16(this ReadOnlySpan<char> value)
Returns
System.UInt16
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ParseInt32(ReadOnlySpan<Char>)
Declaration
public static int ParseInt32(this ReadOnlySpan<char> value)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ParseUInt32(ReadOnlySpan<Char>)
Declaration
public static uint ParseUInt32(this ReadOnlySpan<char> value)
Returns
System.UInt32
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ParseInt64(ReadOnlySpan<Char>)
Declaration
public static long ParseInt64(this ReadOnlySpan<char> value)
Returns
System.Int64
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ParseUInt64(ReadOnlySpan<Char>)
Declaration
public static ulong ParseUInt64(this ReadOnlySpan<char> value)
Returns
System.UInt64
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ParseGuid(ReadOnlySpan<Char>)
Declaration
public static Guid ParseGuid(this ReadOnlySpan<char> value)
Returns
System.Guid
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ParseSignedInteger(ReadOnlySpan<Char>)
Declaration
public static object ParseSignedInteger(this ReadOnlySpan<char> value)
Returns
System.Object
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
TryReadLine(ReadOnlySpan<Char>, out ReadOnlySpan<Char>, ref Int32)
Declaration
public static bool TryReadLine(this ReadOnlySpan<char> text, out ReadOnlySpan<char> line, ref int startIndex)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | text |
ReadOnlySpan<System.Char> | line |
System.Int32 | startIndex |
TryReadPart(ReadOnlySpan<Char>, String, out ReadOnlySpan<Char>, ref Int32)
Declaration
public static bool TryReadPart(this ReadOnlySpan<char> text, string needle, out ReadOnlySpan<char> part, ref int startIndex)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | text |
System.String | needle |
ReadOnlySpan<System.Char> | part |
System.Int32 | startIndex |
Advance(ReadOnlySpan<Char>, Int32)
Declaration
public static ReadOnlySpan<char> Advance(this ReadOnlySpan<char> text, int to)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | text |
System.Int32 | to |
AdvancePastWhitespace(ReadOnlySpan<Char>)
Declaration
public static ReadOnlySpan<char> AdvancePastWhitespace(this ReadOnlySpan<char> literal)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | literal |
AdvancePastChar(ReadOnlySpan<Char>, Char)
Declaration
public static ReadOnlySpan<char> AdvancePastChar(this ReadOnlySpan<char> literal, char delim)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | literal |
System.Char | delim |
Subsegment(ReadOnlySpan<Char>, Int32)
Declaration
[Obsolete("Use Slice()")]
public static ReadOnlySpan<char> Subsegment(this ReadOnlySpan<char> text, int startPos)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | text |
System.Int32 | startPos |
Subsegment(ReadOnlySpan<Char>, Int32, Int32)
Declaration
[Obsolete("Use Slice()")]
public static ReadOnlySpan<char> Subsegment(this ReadOnlySpan<char> text, int startPos, int length)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | text |
System.Int32 | startPos |
System.Int32 | length |
LeftPart(ReadOnlySpan<Char>, Char)
Declaration
public static ReadOnlySpan<char> LeftPart(this ReadOnlySpan<char> strVal, char needle)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | strVal |
System.Char | needle |
LeftPart(ReadOnlySpan<Char>, String)
Declaration
public static ReadOnlySpan<char> LeftPart(this ReadOnlySpan<char> strVal, string needle)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | strVal |
System.String | needle |
RightPart(ReadOnlySpan<Char>, Char)
Declaration
public static ReadOnlySpan<char> RightPart(this ReadOnlySpan<char> strVal, char needle)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | strVal |
System.Char | needle |
RightPart(ReadOnlySpan<Char>, String)
Declaration
public static ReadOnlySpan<char> RightPart(this ReadOnlySpan<char> strVal, string needle)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | strVal |
System.String | needle |
LastLeftPart(ReadOnlySpan<Char>, Char)
Declaration
public static ReadOnlySpan<char> LastLeftPart(this ReadOnlySpan<char> strVal, char needle)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | strVal |
System.Char | needle |
LastLeftPart(ReadOnlySpan<Char>, String)
Declaration
public static ReadOnlySpan<char> LastLeftPart(this ReadOnlySpan<char> strVal, string needle)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | strVal |
System.String | needle |
LastRightPart(ReadOnlySpan<Char>, Char)
Declaration
public static ReadOnlySpan<char> LastRightPart(this ReadOnlySpan<char> strVal, char needle)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | strVal |
System.Char | needle |
LastRightPart(ReadOnlySpan<Char>, String)
Declaration
public static ReadOnlySpan<char> LastRightPart(this ReadOnlySpan<char> strVal, string needle)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | strVal |
System.String | needle |
SplitOnFirst(ReadOnlySpan<Char>, Char, out ReadOnlySpan<Char>, out ReadOnlySpan<Char>)
Declaration
public static void SplitOnFirst(this ReadOnlySpan<char> strVal, char needle, out ReadOnlySpan<char> first, out ReadOnlySpan<char> last)
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | strVal |
System.Char | needle |
ReadOnlySpan<System.Char> | first |
ReadOnlySpan<System.Char> | last |
SplitOnFirst(ReadOnlySpan<Char>, String, out ReadOnlySpan<Char>, out ReadOnlySpan<Char>)
Declaration
public static void SplitOnFirst(this ReadOnlySpan<char> strVal, string needle, out ReadOnlySpan<char> first, out ReadOnlySpan<char> last)
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | strVal |
System.String | needle |
ReadOnlySpan<System.Char> | first |
ReadOnlySpan<System.Char> | last |
SplitOnLast(ReadOnlySpan<Char>, Char, out ReadOnlySpan<Char>, out ReadOnlySpan<Char>)
Declaration
public static void SplitOnLast(this ReadOnlySpan<char> strVal, char needle, out ReadOnlySpan<char> first, out ReadOnlySpan<char> last)
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | strVal |
System.Char | needle |
ReadOnlySpan<System.Char> | first |
ReadOnlySpan<System.Char> | last |
SplitOnLast(ReadOnlySpan<Char>, String, out ReadOnlySpan<Char>, out ReadOnlySpan<Char>)
Declaration
public static void SplitOnLast(this ReadOnlySpan<char> strVal, string needle, out ReadOnlySpan<char> first, out ReadOnlySpan<char> last)
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | strVal |
System.String | needle |
ReadOnlySpan<System.Char> | first |
ReadOnlySpan<System.Char> | last |
WithoutExtension(ReadOnlySpan<Char>)
Declaration
public static ReadOnlySpan<char> WithoutExtension(this ReadOnlySpan<char> filePath)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | filePath |
GetExtension(ReadOnlySpan<Char>)
Declaration
public static ReadOnlySpan<char> GetExtension(this ReadOnlySpan<char> filePath)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | filePath |
ParentDirectory(ReadOnlySpan<Char>)
Declaration
public static ReadOnlySpan<char> ParentDirectory(this ReadOnlySpan<char> filePath)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | filePath |
TrimEnd(ReadOnlySpan<Char>, Char[])
Declaration
public static ReadOnlySpan<char> TrimEnd(this ReadOnlySpan<char> value, params char[] trimChars)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Char[] | trimChars |
SafeSlice(ReadOnlySpan<Char>, Int32)
Declaration
public static ReadOnlySpan<char> SafeSlice(this ReadOnlySpan<char> value, int startIndex)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | startIndex |
SafeSlice(ReadOnlySpan<Char>, Int32, Int32)
Declaration
public static ReadOnlySpan<char> SafeSlice(this ReadOnlySpan<char> value, int startIndex, int length)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | startIndex |
System.Int32 | length |
SubstringWithEllipsis(ReadOnlySpan<Char>, Int32, Int32)
Declaration
public static string SubstringWithEllipsis(this ReadOnlySpan<char> value, int startIndex, int length)
Returns
System.String
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | startIndex |
System.Int32 | length |
IndexOf(ReadOnlySpan<Char>, String)
Declaration
public static int IndexOf(this ReadOnlySpan<char> value, string other)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.String | other |
IndexOf(ReadOnlySpan<Char>, String, Int32)
Declaration
public static int IndexOf(this ReadOnlySpan<char> value, string needle, int start)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.String | needle |
System.Int32 | start |
LastIndexOf(ReadOnlySpan<Char>, String)
Declaration
public static int LastIndexOf(this ReadOnlySpan<char> value, string other)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.String | other |
LastIndexOf(ReadOnlySpan<Char>, String, Int32)
Declaration
public static int LastIndexOf(this ReadOnlySpan<char> value, string needle, int start)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.String | needle |
System.Int32 | start |
EqualTo(ReadOnlySpan<Char>, String)
Declaration
public static bool EqualTo(this ReadOnlySpan<char> value, string other)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.String | other |
EqualTo(ReadOnlySpan<Char>, ReadOnlySpan<Char>)
Declaration
public static bool EqualTo(this ReadOnlySpan<char> value, ReadOnlySpan<char> other)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ReadOnlySpan<System.Char> | other |
EqualsOrdinal(ReadOnlySpan<Char>, String)
Declaration
public static bool EqualsOrdinal(this ReadOnlySpan<char> value, string other)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.String | other |
StartsWith(ReadOnlySpan<Char>, String)
Declaration
public static bool StartsWith(this ReadOnlySpan<char> value, string other)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.String | other |
StartsWith(ReadOnlySpan<Char>, String, StringComparison)
Declaration
public static bool StartsWith(this ReadOnlySpan<char> value, string other, StringComparison comparison)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.String | other |
System.StringComparison | comparison |
EndsWith(ReadOnlySpan<Char>, String, StringComparison)
Declaration
public static bool EndsWith(this ReadOnlySpan<char> value, string other, StringComparison comparison)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.String | other |
System.StringComparison | comparison |
EndsWith(ReadOnlySpan<Char>, String)
Declaration
public static bool EndsWith(this ReadOnlySpan<char> value, string other)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.String | other |
EqualsIgnoreCase(ReadOnlySpan<Char>, ReadOnlySpan<Char>)
Declaration
public static bool EqualsIgnoreCase(this ReadOnlySpan<char> value, ReadOnlySpan<char> other)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ReadOnlySpan<System.Char> | other |
StartsWithIgnoreCase(ReadOnlySpan<Char>, ReadOnlySpan<Char>)
Declaration
public static bool StartsWithIgnoreCase(this ReadOnlySpan<char> value, ReadOnlySpan<char> other)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ReadOnlySpan<System.Char> | other |
EndsWithIgnoreCase(ReadOnlySpan<Char>, ReadOnlySpan<Char>)
Declaration
public static bool EndsWithIgnoreCase(this ReadOnlySpan<char> value, ReadOnlySpan<char> other)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ReadOnlySpan<System.Char> | other |
WriteAsync(Stream, ReadOnlySpan<Char>, CancellationToken)
Declaration
public static Task WriteAsync(this Stream stream, ReadOnlySpan<char> value, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.IO.Stream | stream |
ReadOnlySpan<System.Char> | value |
System.Threading.CancellationToken | token |
SafeSubstring(ReadOnlySpan<Char>, Int32)
Declaration
public static ReadOnlySpan<char> SafeSubstring(this ReadOnlySpan<char> value, int startIndex)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | startIndex |
SafeSubstring(ReadOnlySpan<Char>, Int32, Int32)
Declaration
public static ReadOnlySpan<char> SafeSubstring(this ReadOnlySpan<char> value, int startIndex, int length)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | startIndex |
System.Int32 | length |
Append(StringBuilder, ReadOnlySpan<Char>)
Declaration
public static StringBuilder Append(this StringBuilder sb, ReadOnlySpan<char> value)
Returns
System.Text.StringBuilder
Parameters
Type | Name |
---|
System.Text.StringBuilder | sb |
ReadOnlySpan<System.Char> | value |
ParseBase64(ReadOnlySpan<Char>)
Declaration
public static byte[] ParseBase64(this ReadOnlySpan<char> value)
Returns
System.Byte[]
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ToUtf8(ReadOnlySpan<Char>)
Declaration
public static ReadOnlyMemory<byte> ToUtf8(this ReadOnlySpan<char> value)
Returns
ReadOnlyMemory<System.Byte>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
FromUtf8(ReadOnlySpan<Byte>)
Declaration
public static ReadOnlyMemory<char> FromUtf8(this ReadOnlySpan<byte> value)
Returns
ReadOnlyMemory<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Byte> | value |
ToUtf8Bytes(ReadOnlySpan<Char>)
Declaration
public static byte[] ToUtf8Bytes(this ReadOnlySpan<char> value)
Returns
System.Byte[]
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
FromUtf8Bytes(ReadOnlySpan<Byte>)
Declaration
public static string FromUtf8Bytes(this ReadOnlySpan<byte> value)
Returns
System.String
Parameters
Type | Name |
---|
ReadOnlySpan<System.Byte> | value |
ToStringList(IEnumerable<ReadOnlyMemory<Char>>)
Declaration
public static List<string> ToStringList(this IEnumerable<ReadOnlyMemory<char>> from)
Returns
System.Collections.Generic.List<System.String>
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<ReadOnlyMemory<System.Char>> | from |
CountOccurrencesOf(ReadOnlySpan<Char>, Char)
Declaration
public static int CountOccurrencesOf(this ReadOnlySpan<char> value, char needle)
Returns
System.Int32
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Char | needle |
WithoutBom(ReadOnlySpan<Char>)
Declaration
public static ReadOnlySpan<char> WithoutBom(this ReadOnlySpan<char> value)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
WithoutBom(ReadOnlySpan<Byte>)
Declaration
public static ReadOnlySpan<byte> WithoutBom(this ReadOnlySpan<byte> value)
Returns
ReadOnlySpan<System.Byte>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Byte> | value |