String routines to complement <string> && <cstring>:
|
Go to the documentation of this file.
22 char *
insnsep(
char* num,
char sep,
unsigned w );
31 size_t atoi_vec(
const char* str, intmax_t VEC[],
size_t N );
34 size_t atou_vec(
const char* str, uintmax_t VEC[],
size_t N );
37 uintmax_t
atou_ndigit(
const char* *str,
unsigned N );
40 inline uintmax_t
atouint(
const char * str ) {
41 return strtoull( str,NULL,0 );
45 char*
utoa_sz( uintmax_t val,
char *dst,
unsigned base,
size_t sz );
size_t atou_vec(const char *str, uintmax_t VEC[], size_t N)
Takes all leading numeric values from 'str' to fill up 'VEC[]'.
char * utoa_sz(uintmax_t val, char *dst, unsigned base, size_t sz)
Converts 'val' into the zero terminated C-string 'dst'.
uintmax_t atouint(const char *str)
Converts 'str' into an unsigned number invoking strtoull()
size_t atoi_vec(const char *str, intmax_t VEC[], size_t N)
Take all numeric values from 'str' to fill up 'VEC[]'.
char * insnsep_Rupee(char *num, char sep)
Use 'insnsep()' to format a Rupee amount.
char * insnsep(char *num, char sep, unsigned w)
Insert in place the separator 'sep' for a numeric string.
char * insnsep_date8(char *num, char sep, bool YMD)
Use 'insnsep()' to format a date.
const size_t insnsep_size
Safe size for 'insnsep()'.
uintmax_t atou_ndigit(const char **str, unsigned N)
Extract the next number of 'N' digits from '*str'.