diff options
| author | untodesu <kirill@untode.su> | 2025-09-11 13:48:31 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-09-11 13:48:31 +0500 |
| commit | aaed751bf4430bf4b9b30cef532b8753b9f639ce (patch) | |
| tree | 16bc751c272ba27ad53ec48dbdd3a6d9e6a8d4c2 /core/io/cmdline.hh | |
| parent | 96bd73ae020ecca1f94698744c77498a89ad19f7 (diff) | |
| download | voxelius-aaed751bf4430bf4b9b30cef532b8753b9f639ce.tar.bz2 voxelius-aaed751bf4430bf4b9b30cef532b8753b9f639ce.zip | |
Replace most of C strings with string_view
Diffstat (limited to 'core/io/cmdline.hh')
| -rw-r--r-- | core/io/cmdline.hh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/io/cmdline.hh b/core/io/cmdline.hh index d68d9ef..8b2b4ee 100644 --- a/core/io/cmdline.hh +++ b/core/io/cmdline.hh @@ -5,9 +5,11 @@ namespace io::cmdline { void create(int argc, char** argv); -void insert(const char* option, const char* argument = nullptr); -const char* get(const char* option, const char* fallback = nullptr); -bool contains(const char* option); +void insert(std::string_view option); +void insert(std::string_view option, std::string_view argument); +std::string_view get(std::string_view option, std::string_view fallback = ""); +const char* get_cstr(std::string_view option, const char* fallback = nullptr); +bool contains(std::string_view option); } // namespace io::cmdline #endif // CORE_IO_CMDLINE_HH |
