Skip to content

Commit

Permalink
AK: Expose the decode_hex_digit helper
Browse files Browse the repository at this point in the history
This helper is useful on its own for things like uri encoding/decoding,
so this commit exposes it via the AK/Hex header
  • Loading branch information
IdanHo authored and awesomekling committed Apr 14, 2021
1 parent 2d58549 commit 2ab292f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion AK/Hex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 3 additions & 0 deletions AK/Hex.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@

namespace AK {

u8 decode_hex_digit(char);

Optional<ByteBuffer> decode_hex(const StringView&);

String encode_hex(ReadonlyBytes);

}

using AK::decode_hex;
using AK::decode_hex_digit;
using AK::encode_hex;

0 comments on commit 2ab292f

Please sign in to comment.