xtd 0.2.0
split.cpp

Shows how to use xtd::string::split method.

#include <xtd/console>
#include <xtd/string>
using namespace xtd;
auto main() -> int {
auto strings = string("One Two Three\tFour\nFive").split();
console::write_line("strings.size = {}", strings.size());
for (auto string : strings)
}
// This code produces the following output :
//
// strings.size = 5
// One
// Two
// Three
// Four
// Five
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8