xtd 0.2.0
Loading...
Searching...
No Matches
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)
console::write_line(string);
}
// This code produces the following output :
//
// strings.size = 5
// One
// Two
// Three
// Four
// Five
Represents text as a sequence of character units.
Definition basic_string.h:79
xtd::array< basic_string > split() const noexcept
Splits this basic_string into substrings that are based on the default white-space characters....
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10