SplitNonAlloc Method
- Namespace
- SatorImaging.UnityFundamentals
SplitNonAlloc(ReadOnlySpan<char>, char)
public static NonAllocStringSplitter SplitNonAlloc(this ReadOnlySpan<char> text, char splitter)
Non-allocation string splitter.
Parameters
text
ReadOnlySpan<char>splitter
char
Returns
- NonAllocStringSplitter
use
.Count
and 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
.Count
and 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
text
ReadOnlySpan<char>sequence
ReadOnlySpan<char>
Returns
- NonAllocStringSplitter
use
.Count
and 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
text
stringsequence
ReadOnlySpan<char>
Returns
- NonAllocStringSplitter
use
.Count
and 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
'@'
.