#include <cel_misc.h>
Static Public Member Functions | |
static int | _1digit (int n) |
static int | _1char (int chr) |
static int | fromStrToInt (const UChar1 *str, size_t length) |
static void | fromByte (UChar1 *buffer, u8 n) |
static String | toString (const u8 *bin, size_t size, const String &sep) |
static void | fromString (SimpleArray< u8 > &outBin, const String &str) |
static size_t | fromString (u8 *outBin, size_t inSize, const String &str) |
Utility functions to manipulate Hexa-decimal numbers.
|
inlinestatic |
Converts one of a character of [0-9A-Fa-f] into an integral value.
chr | a character code of [0-9A-Fa-f]. |
Referenced by fromStrToInt().
|
inlinestatic |
Converts a value of [0 15] into an ASCII character that represents the value.
n | A value of [0 15]. |
Referenced by fromByte().
Converts an u8 number into 2-byte long string without any '\0' termination.
buffer | A buffer to get the result; it should be larger than 2 byte. |
n | the number to be converted. |
|
static |
Converts a string into binary data.
outBin | Buffer to receive the result binary. |
str | hex encoded binary. This can be contain non hexa-decimal characters, which are simply skipped during the conversion. |
Converts a string into binary data.
outBin | Buffer to receive the result binary. |
inSize | The size of the buffer. |
str | hex encoded binary. This can be contain non hexa-decimal characters, which are simply skipped during the conversion. |
|
inlinestatic |
Converts a hexa-decimal notation of a number into an integral value. Please note that this function does not care about overflow.
str | A string that represents some number in hexa-decimal notation. |
length | The length of the string. |
Converts a binary array into string.
bin | Pointer to a binary block. |
size | The size of the binary block specified by bin . |
sep | A string to split the string that represents the string. If you want to get strings like "00:11:22:33" then this is ":" . |