Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TryGetSpan()

bool System.String.TryGetSpan ( int startIndex,
int count,
out ReadOnlySpan< char > slice )
inlinepackage

Definition at line 1210 of file String.cs.

1211 {
1212 if ((ulong)((long)(uint)startIndex + (long)(uint)count) > (ulong)(uint)Length)
1213 {
1214 slice = default(ReadOnlySpan<char>);
1215 return false;
1216 }
1217 slice = new ReadOnlySpan<char>(ref Unsafe.Add(ref _firstChar, (nint)(uint)startIndex), count);
1218 return true;
1219 }
char _firstChar
Definition String.cs:35

References System.String._firstChar, System.count, System.String.Length, and System.startIndex.