diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-04 22:39:44 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-04 22:42:12 +0200 |
| commit | 7fcbd6e474235957f2785c3d9b5344b2acf3ff77 (patch) | |
| tree | 4c1a2d5971a9db5330963ac7d77501638efeb4c0 /include/winapi/cmd_line.hpp | |
| parent | upgrade to `using` instead of typedef (diff) | |
| download | winapi-common-7fcbd6e474235957f2785c3d9b5344b2acf3ff77.tar.gz winapi-common-7fcbd6e474235957f2785c3d9b5344b2acf3ff77.zip | |
upgrade to std::string_view
Diffstat (limited to 'include/winapi/cmd_line.hpp')
| -rw-r--r-- | include/winapi/cmd_line.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/winapi/cmd_line.hpp b/include/winapi/cmd_line.hpp index d1a4a7e..af83cac 100644 --- a/include/winapi/cmd_line.hpp +++ b/include/winapi/cmd_line.hpp @@ -6,6 +6,7 @@ #pragma once #include <string> +#include <string_view> #include <utility> #include <vector> @@ -27,7 +28,7 @@ public: * Parse a command line from a string. * @param src UTF-8 encoded string. */ - static CommandLine parse(const std::string& src); + static CommandLine parse(std::string_view src); /** * Build a command line from main() arguments. @@ -64,9 +65,9 @@ public: */ explicit CommandLine(std::vector<std::string> argv); - static std::string escape(const std::string&); + static std::string escape(std::string_view); - static std::string escape_cmd(const std::string&); + static std::string escape_cmd(std::string_view); /** * Build a string that represents this command line. |
