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

◆ Match() [2/2]

bool System.__DTString.Match ( string str)
inlinepackage

Definition at line 246 of file __DTString.cs.

247 {
248 if (++Index >= Length)
249 {
250 return false;
251 }
252 if (str.Length > Value.Length - Index)
253 {
254 return false;
255 }
256 if (m_info.Compare(Value.Slice(Index, str.Length), str, CompareOptions.Ordinal) == 0)
257 {
258 Index += str.Length - 1;
259 return true;
260 }
261 return false;
262 }
int Compare(string? string1, string? string2)
ReadOnlySpan< T > Slice(int start)
readonly CompareInfo m_info
Definition __DTString.cs:14
ReadOnlySpan< char > Value
Definition __DTString.cs:8

References System.Globalization.CompareInfo.Compare(), System.__DTString.Length, System.ReadOnlySpan< T >.Length, System.__DTString.m_info, System.ReadOnlySpan< T >.Slice(), System.str, and System.__DTString.Value.