Introduce create_example_string()

This commit is contained in:
Alexander Karatarakis 2016-09-30 11:23:05 -07:00
parent 3419a7f9ca
commit 0fdd57983a
2 changed files with 8 additions and 2 deletions

View File

@ -9,6 +9,7 @@ namespace vcpkg
void print_usage();
void print_example(const char* command_and_arguments);
std::string create_example_string(const char* command_and_arguments);
void update_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths);
void build_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet);

View File

@ -41,10 +41,15 @@ namespace vcpkg
, INTEGRATE_COMMAND_HELPSTRING);
}
std::string create_example_string(const char* command_and_arguments)
{
return Strings::format("Example:\n"
" vcpkg %s", command_and_arguments);
}
void print_example(const char* command_and_arguments)
{
System::println("Example:\n"
" vcpkg %s", command_and_arguments);
System::println(create_example_string(command_and_arguments).c_str());
}
void internal_test_command(const vcpkg_cmd_arguments& /*args*/, const vcpkg_paths& /*paths*/)