mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:27:35 +00:00
AK: Exclude StringBuilder String APIs from the Kernel
These APIs are only used by userland, and String is OOM-infallible, so let's just ifdef it out of the Kernel.
This commit is contained in:
parent
43e5c326e2
commit
8f093e91e0
2 changed files with 15 additions and 2 deletions
|
@ -22,7 +22,9 @@ public:
|
|||
~StringBuilder() = default;
|
||||
|
||||
ErrorOr<void> try_append(StringView);
|
||||
#ifndef KERNEL
|
||||
ErrorOr<void> try_append(Utf16View const&);
|
||||
#endif
|
||||
ErrorOr<void> try_append(Utf32View const&);
|
||||
ErrorOr<void> try_append_code_point(u32);
|
||||
ErrorOr<void> try_append(char);
|
||||
|
@ -35,7 +37,9 @@ public:
|
|||
ErrorOr<void> try_append(char const*, size_t);
|
||||
|
||||
void append(StringView);
|
||||
#ifndef KERNEL
|
||||
void append(Utf16View const&);
|
||||
#endif
|
||||
void append(Utf32View const&);
|
||||
void append(char);
|
||||
void append_code_point(u32);
|
||||
|
@ -52,8 +56,10 @@ public:
|
|||
MUST(vformat(*this, fmtstr.view(), variadic_format_params));
|
||||
}
|
||||
|
||||
#ifndef KERNEL
|
||||
[[nodiscard]] String build() const;
|
||||
[[nodiscard]] String to_string() const;
|
||||
#endif
|
||||
[[nodiscard]] ByteBuffer to_byte_buffer() const;
|
||||
|
||||
[[nodiscard]] StringView string_view() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue