mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:57:34 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -21,7 +21,7 @@
|
|||
|
||||
namespace Unicode {
|
||||
|
||||
Optional<String> __attribute__((weak)) code_point_display_name(u32) { return {}; }
|
||||
Optional<DeprecatedString> __attribute__((weak)) code_point_display_name(u32) { return {}; }
|
||||
Optional<StringView> __attribute__((weak)) code_point_block_display_name(u32) { return {}; }
|
||||
Optional<StringView> __attribute__((weak)) code_point_abbreviation(u32) { return {}; }
|
||||
u32 __attribute__((weak)) canonical_combining_class(u32) { return {}; }
|
||||
|
@ -221,7 +221,7 @@ u32 __attribute__((weak)) to_unicode_uppercase(u32 code_point)
|
|||
return to_ascii_uppercase(code_point);
|
||||
}
|
||||
|
||||
String to_unicode_lowercase_full(StringView string, [[maybe_unused]] Optional<StringView> locale)
|
||||
DeprecatedString to_unicode_lowercase_full(StringView string, [[maybe_unused]] Optional<StringView> locale)
|
||||
{
|
||||
#if ENABLE_UNICODE_DATA
|
||||
Utf8View view { string };
|
||||
|
@ -250,7 +250,7 @@ String to_unicode_lowercase_full(StringView string, [[maybe_unused]] Optional<St
|
|||
#endif
|
||||
}
|
||||
|
||||
String to_unicode_uppercase_full(StringView string, [[maybe_unused]] Optional<StringView> locale)
|
||||
DeprecatedString to_unicode_uppercase_full(StringView string, [[maybe_unused]] Optional<StringView> locale)
|
||||
{
|
||||
#if ENABLE_UNICODE_DATA
|
||||
Utf8View view { string };
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/Span.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Types.h>
|
||||
#include <LibUnicode/Forward.h>
|
||||
|
||||
|
@ -25,7 +25,7 @@ struct BlockName {
|
|||
StringView display_name;
|
||||
};
|
||||
|
||||
Optional<String> code_point_display_name(u32 code_point);
|
||||
Optional<DeprecatedString> code_point_display_name(u32 code_point);
|
||||
Optional<StringView> code_point_block_display_name(u32 code_point);
|
||||
Optional<StringView> code_point_abbreviation(u32 code_point);
|
||||
|
||||
|
@ -39,8 +39,8 @@ Span<SpecialCasing const* const> special_case_mapping(u32 code_point);
|
|||
u32 to_unicode_lowercase(u32 code_point);
|
||||
u32 to_unicode_uppercase(u32 code_point);
|
||||
|
||||
String to_unicode_lowercase_full(StringView, Optional<StringView> locale = {});
|
||||
String to_unicode_uppercase_full(StringView, Optional<StringView> locale = {});
|
||||
DeprecatedString to_unicode_lowercase_full(StringView, Optional<StringView> locale = {});
|
||||
DeprecatedString to_unicode_uppercase_full(StringView, Optional<StringView> locale = {});
|
||||
|
||||
Optional<GeneralCategory> general_category_from_string(StringView);
|
||||
bool code_point_has_general_category(u32 code_point, GeneralCategory general_category);
|
||||
|
|
|
@ -296,7 +296,7 @@ static Vector<u32> normalize_implementation(Utf8View string, NormalizationForm f
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
String normalize(StringView string, NormalizationForm form)
|
||||
DeprecatedString normalize(StringView string, NormalizationForm form)
|
||||
{
|
||||
Utf8View const view { string };
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/Span.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <LibUnicode/Forward.h>
|
||||
|
||||
|
@ -28,6 +28,6 @@ enum class NormalizationForm {
|
|||
NormalizationForm normalization_form_from_string(StringView form);
|
||||
StringView normalization_form_to_string(NormalizationForm form);
|
||||
|
||||
[[nodiscard]] String normalize(StringView string, NormalizationForm form);
|
||||
[[nodiscard]] DeprecatedString normalize(StringView string, NormalizationForm form);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue