| 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 #ifndef BASE_STRING_TOKENIZER_H_ | 5 #ifndef BASE_STRING_TOKENIZER_H_ |
| 6 #define BASE_STRING_TOKENIZER_H_ | 6 #define BASE_STRING_TOKENIZER_H_ |
| 7 #pragma once | |
| 8 | 7 |
| 9 #include <algorithm> | 8 #include <algorithm> |
| 10 #include <string> | 9 #include <string> |
| 11 | 10 |
| 12 #include "base/string_piece.h" | 11 #include "base/string_piece.h" |
| 13 | 12 |
| 14 // StringTokenizerT is a simple string tokenizer class. It works like an | 13 // StringTokenizerT is a simple string tokenizer class. It works like an |
| 15 // iterator that with each step (see the Advance method) updates members that | 14 // iterator that with each step (see the Advance method) updates members that |
| 16 // refer to the next token in the input string. The user may optionally | 15 // refer to the next token in the input string. The user may optionally |
| 17 // configure the tokenizer to return delimiters. | 16 // configure the tokenizer to return delimiters. |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 bool token_is_delim_; | 247 bool token_is_delim_; |
| 249 }; | 248 }; |
| 250 | 249 |
| 251 typedef StringTokenizerT<std::string, std::string::const_iterator> | 250 typedef StringTokenizerT<std::string, std::string::const_iterator> |
| 252 StringTokenizer; | 251 StringTokenizer; |
| 253 typedef StringTokenizerT<std::wstring, std::wstring::const_iterator> | 252 typedef StringTokenizerT<std::wstring, std::wstring::const_iterator> |
| 254 WStringTokenizer; | 253 WStringTokenizer; |
| 255 typedef StringTokenizerT<std::string, const char*> CStringTokenizer; | 254 typedef StringTokenizerT<std::string, const char*> CStringTokenizer; |
| 256 | 255 |
| 257 #endif // BASE_STRING_TOKENIZER_H_ | 256 #endif // BASE_STRING_TOKENIZER_H_ |
| OLD | NEW |