Shows how to use xtd::string::contains method.
#include <xtd/console>
#include <xtd/string>
auto main() -> int {
auto s = "This is a literal string";
console::write_line("The string: \""_s + s + "\""_s + (string {s}.contains("is") ? " contains " : " does not contain ") + "\"is\" substring."_s);
console::write_line("The string: \""_s + s + "\""_s + (string {s}.contains("z") ? " contains " : " does not contain ") + "\"z\" character."_s);
}
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10