diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-01-18 08:35:25 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-01-18 15:13:25 +0000 |
commit | b87e517debb09f5bc2bf698e23ac3e3ede1eaf95 (patch) | |
tree | dc34db8fb97e086f32cb43b0ee7de8f29b007fd7 /AK | |
parent | d51d5f95913e92ba2c1e55dfe5f0a26ddb776712 (diff) | |
download | serenity-b87e517debb09f5bc2bf698e23ac3e3ede1eaf95.zip |
AK: Remove now-unused AK::UnicodeUtils methods
Diffstat (limited to 'AK')
-rw-r--r-- | AK/UnicodeUtils.cpp | 37 | ||||
-rw-r--r-- | AK/UnicodeUtils.h | 7 |
2 files changed, 0 insertions, 44 deletions
diff --git a/AK/UnicodeUtils.cpp b/AK/UnicodeUtils.cpp deleted file mode 100644 index 2db467065c..0000000000 --- a/AK/UnicodeUtils.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2021, Max Wipfli <mail@maxwipfli.ch> - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#include <AK/Array.h> -#include <AK/Optional.h> -#include <AK/StringView.h> -#include <AK/UnicodeUtils.h> - -namespace AK::UnicodeUtils { - -Optional<StringView> get_unicode_control_code_point_alias(u32 code_point) -{ - static constexpr Array<StringView, 32> ascii_controls_lookup_table = { - "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", - "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", - "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", - "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" - }; - - static constexpr Array<StringView, 32> c1_controls_lookup_table = { - "XXX", "XXX", "BPH", "NBH", "IND", "NEL", "SSA", "ESA", - "HTS", "HTJ", "VTS", "PLD", "PLU", "RI", "SS2", "SS3", - "DCS", "PU1", "PU2", "STS", "CCH", "MW", "SPA", "EPA", - "SOS", "XXX", "SCI", "CSI", "ST", "OSC", "PM", "APC" - }; - - if (code_point < 0x20) - return ascii_controls_lookup_table[code_point]; - if (code_point >= 0x80 && code_point < 0xa0) - return c1_controls_lookup_table[code_point - 0x80]; - return {}; -} - -} diff --git a/AK/UnicodeUtils.h b/AK/UnicodeUtils.h index 18ce9a7daa..c0e2a13ad2 100644 --- a/AK/UnicodeUtils.h +++ b/AK/UnicodeUtils.h @@ -10,13 +10,6 @@ namespace AK::UnicodeUtils { -constexpr bool is_unicode_control_code_point(u32 code_point) -{ - return code_point < 0x20 || (code_point >= 0x80 && code_point < 0xa0); -} - -Optional<StringView> get_unicode_control_code_point_alias(u32); - template<typename Callback> [[nodiscard]] constexpr int code_point_to_utf8(u32 code_point, Callback callback) { |