#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) |
Definition at line 82 of file cel_misc.h.
| static int Celartem::Hex::_1digit | ( | int | n | ) | [inline, static] |
Converts a value of [0 15] into an ASCII character that represents the value.
| n | A value of [0 15]. |
Definition at line 92 of file cel_misc.h.
Referenced by fromByte().
| static int Celartem::Hex::_1char | ( | int | chr | ) | [inline, static] |
Converts one of a character of [0-9A-Fa-f] into an integral value.
| chr | a character code of [0-9A-Fa-f]. |
Definition at line 103 of file cel_misc.h.
Referenced by fromStrToInt().
| static int Celartem::Hex::fromStrToInt | ( | const UChar1 * | str, | |
| size_t | length | |||
| ) | [inline, static] |
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. |
Definition at line 121 of file cel_misc.h.
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. |
Definition at line 140 of file cel_misc.h.
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 ":" . |
| static void Celartem::Hex::fromString | ( | SimpleArray< u8 > & | outBin, | |
| const String & | str | |||
| ) | [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. |