mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27:35 +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
|
@ -15,7 +15,7 @@ namespace TextCodec {
|
|||
class Decoder {
|
||||
public:
|
||||
virtual void process(StringView, Function<void(u32)> on_code_point) = 0;
|
||||
virtual String to_utf8(StringView);
|
||||
virtual DeprecatedString to_utf8(StringView);
|
||||
|
||||
protected:
|
||||
virtual ~Decoder() = default;
|
||||
|
@ -24,19 +24,19 @@ protected:
|
|||
class UTF8Decoder final : public Decoder {
|
||||
public:
|
||||
virtual void process(StringView, Function<void(u32)> on_code_point) override;
|
||||
virtual String to_utf8(StringView) override;
|
||||
virtual DeprecatedString to_utf8(StringView) override;
|
||||
};
|
||||
|
||||
class UTF16BEDecoder final : public Decoder {
|
||||
public:
|
||||
virtual void process(StringView, Function<void(u32)> on_code_point) override;
|
||||
virtual String to_utf8(StringView) override;
|
||||
virtual DeprecatedString to_utf8(StringView) override;
|
||||
};
|
||||
|
||||
class UTF16LEDecoder final : public Decoder {
|
||||
public:
|
||||
virtual void process(StringView, Function<void(u32)> on_code_point) override;
|
||||
virtual String to_utf8(StringView) override;
|
||||
virtual DeprecatedString to_utf8(StringView) override;
|
||||
};
|
||||
|
||||
class Latin1Decoder final : public Decoder {
|
||||
|
@ -79,7 +79,7 @@ public:
|
|||
virtual void process(StringView, Function<void(u32)> on_code_point) override;
|
||||
};
|
||||
|
||||
Decoder* decoder_for(String const& encoding);
|
||||
Decoder* decoder_for(DeprecatedString const& encoding);
|
||||
Optional<StringView> get_standardized_encoding(StringView encoding);
|
||||
|
||||
// This returns the appropriate Unicode decoder for the sniffed BOM or nullptr if there is no appropriate decoder.
|
||||
|
@ -87,6 +87,6 @@ Decoder* bom_sniff_to_decoder(StringView);
|
|||
|
||||
// NOTE: This has an obnoxious name to discourage usage. Only use this if you absolutely must! For example, XHR in LibWeb uses this.
|
||||
// This will use the given decoder unless there is a byte order mark in the input, in which we will instead use the appropriate Unicode decoder.
|
||||
String convert_input_to_utf8_using_given_decoder_unless_there_is_a_byte_order_mark(Decoder&, StringView);
|
||||
DeprecatedString convert_input_to_utf8_using_given_decoder_unless_there_is_a_byte_order_mark(Decoder&, StringView);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue