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 <string_view> 10 #include <vector> 11 12 #include "base/base_export.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 std::wstring_view. 19 [[nodiscard]] BASE_EXPORT std::vector<std::wstring> SplitString( 20 std::wstring_view input, 21 std::wstring_view separators, 22 WhitespaceHandling whitespace, 23 SplitResult result_type); 24 25 [[nodiscard]] BASE_EXPORT std::vector<std::wstring_view> SplitStringPiece( 26 std::wstring_view input, 27 std::wstring_view separators, 28 WhitespaceHandling whitespace, 29 SplitResult result_type); 30 31 [[nodiscard]] BASE_EXPORT std::vector<std::wstring> SplitStringUsingSubstr( 32 std::wstring_view input, 33 std::wstring_view delimiter, 34 WhitespaceHandling whitespace, 35 SplitResult result_type); 36 37 [[nodiscard]] BASE_EXPORT std::vector<std::wstring_view> 38 SplitStringPieceUsingSubstr(std::wstring_view input, 39 std::wstring_view delimiter, 40 WhitespaceHandling whitespace, 41 SplitResult result_type); 42 43 } // namespace base 44 45 #endif // BASE_STRINGS_STRING_SPLIT_WIN_H_ 46