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

◆ IsPrefix() [1/4]

unsafe bool System.Globalization.CompareInfo.IsPrefix ( ReadOnlySpan< char > source,
ReadOnlySpan< char > prefix,
CompareOptions options,
out int matchLength )
inline

Definition at line 470 of file CompareInfo.cs.

471 {
472 bool flag;
473 if (GlobalizationMode.Invariant || prefix.IsEmpty || ((uint)options & 0xFFFFFFE0u) != 0)
474 {
475 flag = IsPrefix(source, prefix, options);
476 matchLength = (flag ? prefix.Length : 0);
477 }
478 else
479 {
480 int num = 0;
481 flag = StartsWithCore(source, prefix, options, &num);
482 matchLength = num;
483 }
484 return flag;
485 }
bool IsPrefix(string source, string prefix, CompareOptions options)
unsafe bool StartsWithCore(ReadOnlySpan< char > source, ReadOnlySpan< char > prefix, CompareOptions options, int *matchLengthPtr)

References System.Runtime.Serialization.Dictionary, System.Globalization.GlobalizationMode.Invariant, System.Globalization.CompareInfo.IsPrefix(), System.options, System.prefix, System.source, and System.Globalization.CompareInfo.StartsWithCore().