tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

string_split_win.h (1338B)


      1 // Copyright 2020 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 #ifndef BASE_STRINGS_STRING_SPLIT_WIN_H_
      6 #define BASE_STRINGS_STRING_SPLIT_WIN_H_
      7 
      8 #include <string>
      9 #include <vector>
     10 
     11 #include "base/base_export.h"
     12 #include "base/strings/string_piece.h"
     13 #include "base/strings/string_split.h"
     14 
     15 namespace base {
     16 
     17 // The following section contains overloads of the cross-platform APIs for
     18 // std::wstring and base::WStringPiece.
     19 [[nodiscard]] BASE_EXPORT std::vector<std::wstring> SplitString(
     20    WStringPiece input,
     21    WStringPiece separators,
     22    WhitespaceHandling whitespace,
     23    SplitResult result_type);
     24 
     25 [[nodiscard]] BASE_EXPORT std::vector<WStringPiece> SplitStringPiece(
     26    WStringPiece input,
     27    WStringPiece separators,
     28    WhitespaceHandling whitespace,
     29    SplitResult result_type);
     30 
     31 [[nodiscard]] BASE_EXPORT std::vector<std::wstring> SplitStringUsingSubstr(
     32    WStringPiece input,
     33    WStringPiece delimiter,
     34    WhitespaceHandling whitespace,
     35    SplitResult result_type);
     36 
     37 [[nodiscard]] BASE_EXPORT std::vector<WStringPiece> SplitStringPieceUsingSubstr(
     38    WStringPiece input,
     39    WStringPiece delimiter,
     40    WhitespaceHandling whitespace,
     41    SplitResult result_type);
     42 
     43 }  // namespace base
     44 
     45 #endif  // BASE_STRINGS_STRING_SPLIT_WIN_H_