mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 22:07:36 +00:00
LibCore: Add StringView overloads for Core::ArgsParser
These allow you to get StringView wrappers around on-stack string arguments, which seems pretty nice. :^)
This commit is contained in:
parent
dd9b8ee7ef
commit
313e53dca0
2 changed files with 33 additions and 0 deletions
|
@ -55,12 +55,14 @@ public:
|
|||
void add_option(bool& value, const char* help_string, const char* long_name, char short_name);
|
||||
void add_option(const char*& value, const char* help_string, const char* long_name, char short_name, const char* value_name);
|
||||
void add_option(String& value, const char* help_string, const char* long_name, char short_name, const char* value_name);
|
||||
void add_option(StringView& value, char const* help_string, char const* long_name, char short_name, char const* value_name);
|
||||
void add_option(int& value, const char* help_string, const char* long_name, char short_name, const char* value_name);
|
||||
void add_option(double& value, const char* help_string, const char* long_name, char short_name, const char* value_name);
|
||||
|
||||
void add_positional_argument(Arg&&);
|
||||
void add_positional_argument(const char*& value, const char* help_string, const char* name, Required required = Required::Yes);
|
||||
void add_positional_argument(String& value, const char* help_string, const char* name, Required required = Required::Yes);
|
||||
void add_positional_argument(StringView& value, char const* help_string, char const* name, Required required = Required::Yes);
|
||||
void add_positional_argument(int& value, const char* help_string, const char* name, Required required = Required::Yes);
|
||||
void add_positional_argument(double& value, const char* help_string, const char* name, Required required = Required::Yes);
|
||||
void add_positional_argument(Vector<const char*>& value, const char* help_string, const char* name, Required required = Required::Yes);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue