@@ -34,9 +34,9 @@ namespace essence::cli {
3434 constexpr meta::fingerprint boolean_type_id{std::type_identity<bool >{}};
3535
3636 const auto help_option = option<bool >{}
37- .set_bound_name(U8( " help" ) )
38- .set_description(U8( " Show this help." ) )
39- .add_aliases(U8( " h" ), U8( " ?" ) )
37+ .set_bound_name(" help" )
38+ .set_description(" Show this help." )
39+ .add_aliases(" h" , " ?" )
4040 .as_abstract();
4141
4242 constexpr std::pair<bool , bool > check_option_prefix (std::string_view name) noexcept {
@@ -100,12 +100,12 @@ namespace essence::cli {
100100
101101 void show_help () const {
102102 on_output_.try_invoke (common_tokens::fixed_help_content);
103- on_output_.try_invoke (format (common_tokens::help_option_header_pattern, U8 ( " Option " ), U8 ( " Value " ),
104- U8 ( " Default" ), U8 ( " Description" ) ));
103+ on_output_.try_invoke (
104+ format (common_tokens::help_option_header_pattern, " Option " , " Value " , " Default" , " Description" ));
105105
106106 for (auto && item : options_) {
107107 on_output_.try_invoke (format (common_tokens::help_option_header_pattern, item.name_hints (),
108- item.value_hints (), item.default_value_str ().value_or (U8 ( " `mandatory`" ) ), item.description ()));
108+ item.value_hints (), item.default_value_str ().value_or (" `mandatory`" ), item.description ()));
109109 }
110110 }
111111
@@ -163,7 +163,7 @@ namespace essence::cli {
163163 for (auto && item : adapter) {
164164 // Outputs the missing options.
165165 if (!item.default_value_str ()) {
166- on_error_.try_invoke (format (U8 ( " Missing mandatory option: {}." ) , item.name_hints ()));
166+ on_error_.try_invoke (format (" Missing mandatory option: {}." , item.name_hints ()));
167167 success_ = false ;
168168 }
169169
@@ -213,7 +213,7 @@ namespace essence::cli {
213213 bool validate_option (std::string_view& value, bool single, bool boolean, const abstract::option& option) const {
214214 // If combined abbreviations are specified, all types of the options must be bool.
215215 if (!single && !boolean) {
216- on_error_.try_invoke (U8 ( " All types of combined abbreviations must be bool." ) );
216+ on_error_.try_invoke (" All types of combined abbreviations must be bool." );
217217
218218 return false ;
219219 }
@@ -235,7 +235,7 @@ namespace essence::cli {
235235 const auto index = arg.find (common_tokens::equal);
236236
237237 return std::pair{
238- trim (arg.substr (0 , index)), index == std::string_view::npos ? U8 ( " " ) : trim (arg.substr (index + 1 ))};
238+ trim (arg.substr (0 , index)), index == std::string_view::npos ? " " : trim (arg.substr (index + 1 ))};
239239 }();
240240
241241 auto && [has_option_prefix, has_option_abbreviation_prefix] = check_option_prefix (name);
@@ -250,7 +250,7 @@ namespace essence::cli {
250250 // Options like -xyz=abc is illegal.
251251 if (has_option_abbreviation_prefix && name.size () > 2 && !value.empty ()) {
252252 on_error_.try_invoke (
253- format (U8 ( " Explicitly assigning values to combined abbreviations is not allowed: {}." ) , arg));
253+ format (" Explicitly assigning values to combined abbreviations is not allowed: {}." , arg));
254254
255255 return args_.size ();
256256 }
@@ -272,16 +272,16 @@ namespace essence::cli {
272272
273273 // --option true/false is omitted.
274274 if (any_boolean && next_as_value) {
275- value = U8 ( " " ) ;
275+ value = " " ;
276276 }
277277
278278 if (!validate_option (value, single, boolean, option)) {
279279 return args_.size ();
280280 }
281281
282282 if (!option.parse_value_and_cache (value)) {
283- on_error_.try_invoke (format (U8 ( " When parsing the command line argument: {}." ) , arg));
284- on_error_.try_invoke (format (U8 ( " Matched option: {}." ) , option.name_hints ()));
283+ on_error_.try_invoke (format (" When parsing the command line argument: {}." , arg));
284+ on_error_.try_invoke (format (" Matched option: {}." , option.name_hints ()));
285285
286286 return args_.size ();
287287 }
0 commit comments