• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2012 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // This header is deprecated. `base::StringPiece` is now `std::string_view`.
6 // Use it and <string_view> instead.
7 //
8 // TODO(crbug.com/691162): Remove uses of this header.
9 
10 #ifndef BASE_STRINGS_STRING_PIECE_H_
11 #define BASE_STRINGS_STRING_PIECE_H_
12 
13 #include <string_view>
14 
15 namespace base {
16 
17 template <typename CharT, typename Traits = std::char_traits<CharT>>
18 using BasicStringPiece = std::basic_string_view<CharT, Traits>;
19 using StringPiece = std::string_view;
20 using StringPiece16 = std::u16string_view;
21 
22 }  // namespace base
23 
24 #endif  // BASE_STRINGS_STRING_PIECE_H_
25