diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-04-13 22:49:05 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-14 13:30:10 +0200 |
commit | 2ab292f3811e3d1b553e4897ebc192de409d9ab9 (patch) | |
tree | 9b4a9b2fe337da7a8177239e3f804623ff984528 /AK | |
parent | 2d58549296531819332e106d86dc92dfbf017ea5 (diff) | |
download | serenity-2ab292f3811e3d1b553e4897ebc192de409d9ab9.zip |
AK: Expose the decode_hex_digit helper
This helper is useful on its own for things like uri encoding/decoding,
so this commit exposes it via the AK/Hex header
Diffstat (limited to 'AK')
-rw-r--r-- | AK/Hex.cpp | 2 | ||||
-rw-r--r-- | AK/Hex.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/AK/Hex.cpp b/AK/Hex.cpp index e0913392f5..0e3c367bff 100644 --- a/AK/Hex.cpp +++ b/AK/Hex.cpp @@ -35,7 +35,7 @@ namespace AK { -static u8 decode_hex_digit(char digit) +u8 decode_hex_digit(char digit) { if (digit >= '0' && digit <= '9') return digit - '0'; @@ -33,6 +33,8 @@ namespace AK { +u8 decode_hex_digit(char); + Optional<ByteBuffer> decode_hex(const StringView&); String encode_hex(ReadonlyBytes); @@ -40,4 +42,5 @@ String encode_hex(ReadonlyBytes); } using AK::decode_hex; +using AK::decode_hex_digit; using AK::encode_hex; |