-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Expand file tree
/
Copy pathpal_collation.h
More file actions
110 lines (93 loc) · 6.24 KB
/
pal_collation.h
File metadata and controls
110 lines (93 loc) · 6.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#pragma once
#include "pal_locale.h"
#include "pal_compiler.h"
#include "pal_errors.h"
typedef struct SortHandle SortHandle;
typedef struct _Range {
int32_t location;
int32_t length;
} Range;
PALEXPORT ResultCode GlobalizationNative_GetSortHandle(const char* lpLocaleName, SortHandle** ppSortHandle);
PALEXPORT void GlobalizationNative_CloseSortHandle(SortHandle* pSortHandle);
// If we fail to get the sort version we will fallback to -1 as the sort version.
PALEXPORT int32_t GlobalizationNative_GetSortVersion(SortHandle* pSortHandle);
PALEXPORT int32_t GlobalizationNative_CompareString(SortHandle* pSortHandle,
const UChar* lpStr1,
int32_t cwStr1Length,
const UChar* lpStr2,
int32_t cwStr2Length,
int32_t options);
PALEXPORT int32_t GlobalizationNative_IndexOf(SortHandle* pSortHandle,
const UChar* lpTarget,
int32_t cwTargetLength,
const UChar* lpSource,
int32_t cwSourceLength,
int32_t options,
int32_t* pMatchedLength);
PALEXPORT int32_t GlobalizationNative_LastIndexOf(SortHandle* pSortHandle,
const UChar* lpTarget,
int32_t cwTargetLength,
const UChar* lpSource,
int32_t cwSourceLength,
int32_t options,
int32_t* pMatchedLength);
PALEXPORT int32_t GlobalizationNative_StartsWith(SortHandle* pSortHandle,
const UChar* lpTarget,
int32_t cwTargetLength,
const UChar* lpSource,
int32_t cwSourceLength,
int32_t options,
int32_t* pMatchedLength);
PALEXPORT int32_t GlobalizationNative_EndsWith(SortHandle* pSortHandle,
const UChar* lpTarget,
int32_t cwTargetLength,
const UChar* lpSource,
int32_t cwSourceLength,
int32_t options,
int32_t* pMatchedLength);
PALEXPORT int32_t GlobalizationNative_GetSortKey(SortHandle* pSortHandle,
const UChar* lpStr,
int32_t cwStrLength,
uint8_t* sortKey,
int32_t cbSortKeyLength,
int32_t options);
#if defined(APPLE_HYBRID_GLOBALIZATION)
PALEXPORT int32_t GlobalizationNative_CompareStringNative(const uint16_t* localeName,
int32_t lNameLength,
const uint16_t* lpTarget,
int32_t cwTargetLength,
const uint16_t* lpSource,
int32_t cwSourceLength,
int32_t options);
PALEXPORT Range GlobalizationNative_IndexOfNative(const uint16_t* localeName,
int32_t lNameLength,
const uint16_t* lpTarget,
int32_t cwTargetLength,
const uint16_t* lpSource,
int32_t cwSourceLength,
int32_t options,
int32_t fromBeginning);
PALEXPORT int32_t GlobalizationNative_StartsWithNative(const uint16_t* localeName,
int32_t lNameLength,
const uint16_t* lpPrefix,
int32_t cwPrefixLength,
const uint16_t* lpSource,
int32_t cwSourceLength,
int32_t options);
PALEXPORT int32_t GlobalizationNative_EndsWithNative(const uint16_t* localeName,
int32_t lNameLength,
const uint16_t* lpSuffix,
int32_t cwSuffixLength,
const uint16_t* lpSource,
int32_t cwSourceLength,
int32_t options);
PALEXPORT int32_t GlobalizationNative_GetSortKeyNative(const uint16_t* localeName,
int32_t lNameLength,
const UChar* lpStr,
int32_t cwStrLength,
uint8_t* sortKey,
int32_t cbSortKeyLength,
int32_t options);
#endif