[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / content / common / android / address_parser.h
blob1a12a32c14d3a947cb84932cf533819be00e2945
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_COMMON_ADDRESS_PARSER_H_
6 #define CONTENT_COMMON_ADDRESS_PARSER_H_
8 #include "base/strings/string16.h"
9 #include "content/common/content_export.h"
11 namespace content {
13 // Provides methods to find a geographical address (currently US only)
14 // in a given text string.
15 namespace address_parser {
17 // Find the first address in some chunk of text. If an address is found in
18 // |text| true is returned and the address is copied into |address|.
19 // Otherwise, false is returned.
20 bool FindAddress(const base::string16& text, base::string16* address);
22 // Find the first address in some chunk of test. |begin| is the starting
23 // position to search from, |end| is the position to search to. |start_pos|
24 // and |end_pos| are set to the starting and ending position of the address,
25 // if found.
26 CONTENT_EXPORT bool FindAddress(const base::string16::const_iterator& begin,
27 const base::string16::const_iterator& end,
28 size_t* start_pos,
29 size_t* end_pos);
31 } // namespace address_parser
33 } // namespace content
35 #endif // CONTENT_COMMON_ADDRESS_PARSER_H_