SplitNonAlloc Method
- Namespace
- SatorImaging.UnityFundamentals
SplitNonAlloc(ReadOnlySpan<char>, char)
public static NonAllocStringSplitter SplitNonAlloc(this ReadOnlySpan<char> text, char splitter)
Non-allocation string splitter.
Parameters
textReadOnlySpan<char>splitterchar
Returns
- NonAllocStringSplitter
use
.Countand indexer[int]to enumerate splitted spans.
Remarks
NOTE: max 10 items are allowed to be splitted otherwise throws IndexOutOfRangeException.
- able to retrieve error position in input text by splitting exception message with
'@'.
SplitNonAlloc(string, char)
public static NonAllocStringSplitter SplitNonAlloc(this string text, char splitter)
Non-allocation string splitter.
Parameters
Returns
- NonAllocStringSplitter
use
.Countand indexer[int]to enumerate splitted spans.
Remarks
NOTE: max 10 items are allowed to be splitted otherwise throws IndexOutOfRangeException.
- able to retrieve error position in input text by splitting exception message with
'@'.
SplitNonAlloc(ReadOnlySpan<char>, ReadOnlySpan<char>)
public static NonAllocStringSplitter SplitNonAlloc(this ReadOnlySpan<char> text, ReadOnlySpan<char> sequence)
Non-allocation string splitter.
Parameters
textReadOnlySpan<char>sequenceReadOnlySpan<char>
Returns
- NonAllocStringSplitter
use
.Countand indexer[int]to enumerate splitted spans.
Remarks
NOTE: max 10 items are allowed to be splitted otherwise throws IndexOutOfRangeException.
- able to retrieve error position in input text by splitting exception message with
'@'.
SplitNonAlloc(string, ReadOnlySpan<char>)
public static NonAllocStringSplitter SplitNonAlloc(this string text, ReadOnlySpan<char> sequence)
Non-allocation string splitter.
Parameters
textstringsequenceReadOnlySpan<char>
Returns
- NonAllocStringSplitter
use
.Countand indexer[int]to enumerate splitted spans.
Remarks
NOTE: max 10 items are allowed to be splitted otherwise throws IndexOutOfRangeException.
- able to retrieve error position in input text by splitting exception message with
'@'.