aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_other.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-09-30 11:23:05 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2016-09-30 11:23:05 -0700
commit0fdd57983a6ea25324df861d96c1c45136160338 (patch)
tree59c0c037621268860d8b522ecfe8e6498c9de08a /toolsrc/src/commands_other.cpp
parent3419a7f9ca7640a976e8a332c5f74d222b150c6c (diff)
downloadvcpkg-0fdd57983a6ea25324df861d96c1c45136160338.tar.gz
vcpkg-0fdd57983a6ea25324df861d96c1c45136160338.zip
Introduce create_example_string()
Diffstat (limited to 'toolsrc/src/commands_other.cpp')
-rw-r--r--toolsrc/src/commands_other.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/toolsrc/src/commands_other.cpp b/toolsrc/src/commands_other.cpp
index f4fad6690..63f7c52b2 100644
--- a/toolsrc/src/commands_other.cpp
+++ b/toolsrc/src/commands_other.cpp
@@ -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*/)