1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:37:34 +00:00

Everywhere: Pass AK::StringView by value

This commit is contained in:
Andreas Kling 2021-11-11 00:55:02 +01:00
parent ad5d217e76
commit 8b1108e485
392 changed files with 978 additions and 978 deletions

View file

@ -222,7 +222,7 @@ u32 to_unicode_uppercase(u32 code_point)
#endif
}
String to_unicode_lowercase_full(StringView const& string, [[maybe_unused]] Optional<StringView> locale)
String to_unicode_lowercase_full(StringView string, [[maybe_unused]] Optional<StringView> locale)
{
#if ENABLE_UNICODE_DATA
Utf8View view { string };
@ -251,7 +251,7 @@ String to_unicode_lowercase_full(StringView const& string, [[maybe_unused]] Opti
#endif
}
String to_unicode_uppercase_full(StringView const& string, [[maybe_unused]] Optional<StringView> locale)
String to_unicode_uppercase_full(StringView string, [[maybe_unused]] Optional<StringView> locale)
{
#if ENABLE_UNICODE_DATA
Utf8View view { string };
@ -280,7 +280,7 @@ String to_unicode_uppercase_full(StringView const& string, [[maybe_unused]] Opti
#endif
}
Optional<GeneralCategory> general_category_from_string([[maybe_unused]] StringView const& general_category)
Optional<GeneralCategory> general_category_from_string([[maybe_unused]] StringView general_category)
{
#if ENABLE_UNICODE_DATA
return Detail::general_category_from_string(general_category);
@ -298,7 +298,7 @@ bool code_point_has_general_category([[maybe_unused]] u32 code_point, [[maybe_un
#endif
}
Optional<Property> property_from_string([[maybe_unused]] StringView const& property)
Optional<Property> property_from_string([[maybe_unused]] StringView property)
{
#if ENABLE_UNICODE_DATA
return Detail::property_from_string(property);
@ -383,7 +383,7 @@ bool is_ecma262_property([[maybe_unused]] Property property)
#endif
}
Optional<Script> script_from_string([[maybe_unused]] StringView const& script)
Optional<Script> script_from_string([[maybe_unused]] StringView script)
{
#if ENABLE_UNICODE_DATA
return Detail::script_from_string(script);

View file

@ -19,17 +19,17 @@ namespace Unicode {
u32 to_unicode_lowercase(u32 code_point);
u32 to_unicode_uppercase(u32 code_point);
String to_unicode_lowercase_full(StringView const&, Optional<StringView> locale = {});
String to_unicode_uppercase_full(StringView const&, Optional<StringView> locale = {});
String to_unicode_lowercase_full(StringView, Optional<StringView> locale = {});
String to_unicode_uppercase_full(StringView, Optional<StringView> locale = {});
Optional<GeneralCategory> general_category_from_string(StringView const&);
Optional<GeneralCategory> general_category_from_string(StringView);
bool code_point_has_general_category(u32 code_point, GeneralCategory general_category);
Optional<Property> property_from_string(StringView const&);
Optional<Property> property_from_string(StringView);
bool code_point_has_property(u32 code_point, Property property);
bool is_ecma262_property(Property);
Optional<Script> script_from_string(StringView const&);
Optional<Script> script_from_string(StringView);
bool code_point_has_script(u32 code_point, Script script);
bool code_point_has_script_extension(u32 code_point, Script script);