OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/i18n/string_search.h" | 5 #include "base/i18n/string_search.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 | 7 |
8 #include "unicode/usearch.h" | 8 #include "third_party/icu/public/i18n/unicode/usearch.h" |
9 | 9 |
10 namespace { | 10 namespace { |
11 | 11 |
12 bool CollationSensitiveStringSearch(const string16& find_this, | 12 bool CollationSensitiveStringSearch(const string16& find_this, |
13 const string16& in_this, | 13 const string16& in_this, |
14 UCollationStrength strength, | 14 UCollationStrength strength, |
15 size_t* match_index, | 15 size_t* match_index, |
16 size_t* match_length) { | 16 size_t* match_length) { |
17 UErrorCode status = U_ZERO_ERROR; | 17 UErrorCode status = U_ZERO_ERROR; |
18 | 18 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 size_t* match_length) { | 69 size_t* match_length) { |
70 return CollationSensitiveStringSearch(find_this, | 70 return CollationSensitiveStringSearch(find_this, |
71 in_this, | 71 in_this, |
72 UCOL_PRIMARY, | 72 UCOL_PRIMARY, |
73 match_index, | 73 match_index, |
74 match_length); | 74 match_length); |
75 } | 75 } |
76 | 76 |
77 } // namespace i18n | 77 } // namespace i18n |
78 } // namespace base | 78 } // namespace base |
OLD | NEW |