summaryrefslogtreecommitdiffstats
path: root/base/i18n/string_search.h
blob: 6602451ed7c1d4c7296fe5dad5a0a85a46fbccb0 (plain)
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
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_I18N_STRING_SEARCH_H_
#define BASE_I18N_STRING_SEARCH_H_
#pragma once

#include "base/i18n/base_i18n_export.h"
#include "base/string16.h"

namespace base {
namespace i18n {

// Returns true if |in_this| contains |find_this|. Only differences between base
// letters are taken into consideration. Case and accent differences are
// ignored. Please refer to 'primary level' in
// http://userguide.icu-project.org/collation/concepts for additional details.
BASE_I18N_EXPORT
    bool StringSearchIgnoringCaseAndAccents(const string16& find_this,
                                            const string16& in_this);

}  // namespace i18n
}  // namespace base

#endif  // BASE_I18N_STRING_SEARCH_H_