xtd 0.2.0
Loading...
Searching...
No Matches
compare.cpp

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

#include <xtd/console>
#include <xtd/string>
using namespace xtd;
auto main() -> int {
auto result = string::compare("Aaa", "Baa");
if (result < 0)
console::write_line("Aaa < Baa");
else if (result > 0)
console::write_line("Aaa > Baa");
else
console::write_line("Aaa == Baa");
}
// This code produces the following output :
//
// Aaa < Baa
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10