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

◆ NlsCreateSortKey()

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

Definition at line 2073 of file CompareInfo.cs.

2074 {
2075 if (source == null)
2076 {
2077 throw new ArgumentNullException("source");
2078 }
2079 if (((uint)options & 0xDFFFFFE0u) != 0)
2080 {
2081 throw new ArgumentException(SR.Argument_InvalidFlag, "options");
2082 }
2083 uint dwMapFlags = 0x400u | (uint)GetNativeCompareFlags(options);
2084 int num = source.Length;
2085 if (num == 0)
2086 {
2087 num = -1;
2088 }
2089 byte[] array;
2090 fixed (char* lpSrcStr = source)
2091 {
2093 if (num2 == 0)
2094 {
2095 throw new ArgumentException(SR.Arg_ExternalException);
2096 }
2097 array = new byte[num2];
2098 fixed (byte* lpDestStr = array)
2099 {
2101 {
2102 throw new ArgumentException(SR.Arg_ExternalException);
2103 }
2104 }
2105 }
2106 return new SortKey(this, source, options, array);
2107 }
static unsafe int LCMapStringEx(string lpLocaleName, uint dwMapFlags, char *lpSrcStr, int cchSrc, void *lpDestStr, int cchDest, void *lpVersionInformation, void *lpReserved, IntPtr sortHandle)
static int GetNativeCompareFlags(CompareOptions options)

References System.Globalization.CompareInfo._sortHandle, System.Globalization.CompareInfo._sortName, System.SR.Arg_ExternalException, System.SR.Argument_InvalidFlag, System.array, System.Runtime.Serialization.Dictionary, System.Globalization.CompareInfo.GetNativeCompareFlags(), Interop.Kernel32.LCMapStringEx(), System.options, System.source, and System.IntPtr.Zero.

Referenced by System.Globalization.CompareInfo.CreateSortKeyCore().