LAR Library
1.14
|
conv.h File Reference
Conversion routines. More...
#include <larlib/base.h>
Go to the source code of this file.
Enumerations | |
enum | convErrors_t { CONV_ERR_INVALID_BASE = -101 } |
Error codes specific to this module. More... | |
Functions | |
int | convTxtToInt (const char *txt, int cnt, int base, uint64_t *n) |
Convert Text to Integer. More... | |
int | convTxtToInt8 (const char *txt, int cnt, int base, uint8_t *n) |
Convert Text to an uint8_t. More... | |
int | convTxtToInt16 (const char *txt, int cnt, int base, uint16_t *n) |
Convert Text to an uint16_t. More... | |
int | convTxtToInt32 (const char *txt, int cnt, int base, uint32_t *n) |
Convert Text to an uint32_t. More... | |
int | convTxtToInt64 (const char *txt, int cnt, int base, uint64_t *n) |
This function is a synonym to convTxtToInt(). More... | |
int | convIntToTxt (uint64_t n, char *txt, int maxcnt, int base) |
Convert Integer to Text. More... | |
int | convIntToTxtPad (uint64_t n, char *txt, int cnt, int base) |
Convert Integer to Text padding left with zeroes to fill cnt chars. More... | |
int | convBufToHex (const uint8_t *buf, int nbuf, char *hex, int maxcnt) |
Convert buffer to hexadecimal string. More... | |
int | convHexToBuf (const char *hex, int cnt, uint8_t *buf, int maxbuf) |
Convert hexadecimal string to buffer. More... | |
int | convIntToBcd (uint64_t n, uint8_t *bcd, int maxcnt, int padRight) |
Convert Integer to BCD. More... | |
int | convIntToBcdPad (uint64_t n, uint8_t *bcd, int nibbles) |
Convert Integer to BCD with left padding. More... | |
int | convBcdToInt (const uint8_t *bcd, int cnt, uint64_t *n) |
Convert BCD to Integer. More... | |
int | convTxtToBcd (const char *txt, int maxtxt, uint8_t *bcd, int maxbcd) |
Convert a string of decimal digits (or ISO PAN) to BCD. More... | |
int | convBcdToTxt (const uint8_t *bcd, int maxbcd, char *txt, int maxtxt) |
Convert a sequence of digits in BCD format to a decimal string. More... | |
int | convIntToBuf (uint64_t n, uint8_t *buf, int maxbuf) |
Convert an integer to a sequence of bytes in big-endian ordering. More... | |
int | convIntToBufPad (uint64_t n, uint8_t *buf, int maxbuf) |
Convert an integer to a sequence of bytes in big-endian ordering and with padding. More... | |
uint64_t | convBufToInt (const uint8_t *buf, int nbuf) |
Convert a sequence of bytes in big-endian ordering to an integer. More... | |
int | convBase64ToBuf (const char *b64, int cnt, uint8_t *buf, int maxbuf) |
Decode a base-64 encoded string into a sequence of bytes. More... | |
int | convBufToBase64 (const uint8_t *buf, int nbuf, char *b64, int maxb64) |
Encode a sequence of bytes into a Base-64 string. More... | |
Detailed Description
Conversion routines.
Generated on Mon Mar 27 2017 15:42:52 for LAR Library by 1.8.9.1