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

◆ InvariantCreateSortKey()

SortKey System.Globalization.CompareInfo.InvariantCreateSortKey ( string source,
CompareOptions options )
inlineprivate

Definition at line 1803 of file CompareInfo.cs.

1804 {
1805 if (source == null)
1806 {
1807 throw new ArgumentNullException("source");
1808 }
1809 if (((uint)options & 0xDFFFFFE0u) != 0)
1810 {
1811 throw new ArgumentException(SR.Argument_InvalidFlag, "options");
1812 }
1813 byte[] array;
1814 if (source.Length == 0)
1815 {
1816 array = Array.Empty<byte>();
1817 }
1818 else
1819 {
1820 array = new byte[source.Length * 2];
1821 if ((options & (CompareOptions.IgnoreCase | CompareOptions.OrdinalIgnoreCase)) != 0)
1822 {
1824 }
1825 else
1826 {
1828 }
1829 }
1830 return new SortKey(this, source, options, array);
1831 }
static void InvariantCreateSortKeyOrdinal(ReadOnlySpan< char > source, Span< byte > sortKey)
static void InvariantCreateSortKeyOrdinalIgnoreCase(ReadOnlySpan< char > source, Span< byte > sortKey)

References System.SR.Argument_InvalidFlag, System.array, System.Runtime.Serialization.Dictionary, System.Globalization.CompareInfo.InvariantCreateSortKeyOrdinal(), System.Globalization.CompareInfo.InvariantCreateSortKeyOrdinalIgnoreCase(), System.options, and System.source.

Referenced by System.Globalization.CompareInfo.GetSortKey(), and System.Globalization.CompareInfo.GetSortKey().