From 7fcbd6e474235957f2785c3d9b5344b2acf3ff77 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 4 Jun 2026 22:39:44 +0200 Subject: upgrade to std::string_view --- include/winapi/cmd_line.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/winapi/cmd_line.hpp') 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 +#include #include #include @@ -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 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. -- cgit v1.3