/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include #include namespace folly { template class fbvector; template struct Optional; class fbstring; class StringPiece; template void split(const Delim& delimiter, const String& input, std::vector& out, const bool ignoreEmpty = false); template void split(const Delim& delimiter, const String& input, folly::fbvector& out, const bool ignoreEmpty = false); template void splitTo(const Delim& delimiter, const String& input, OutputIterator out, const bool ignoreEmpty = false); } // namespace folly namespace folly_split { std::string do_not_ignore_empty_Good(const std::string& s) { std::vector v; folly::split("delimiter", s, v); return v[0]; } std::string do_not_ignore_empty2_Good(const std::string& s) { std::vector v; folly::split("delimiter", s, v, false); return v[0]; } std::string do_not_ignore_empty_Bad(const std::string& s) { std::vector v; folly::split("delimiter", s, v, true); return v[0]; } } // namespace folly_split