Shows how to use xtd::environment::expand_environment_variables method.
#include <xtd/console>
#include <xtd/environment>
auto main() -> int {
auto str = string::empty_string;
auto nl = environment::new_line();
console::write_line();
auto query = "My system drive is %SystemDrive% and my system root is %SystemRoot%";
str = environment::expand_environment_variables(query);
console::write_line("expand_environment_variables: {0} {1}", nl, str);
}
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10