utilities for ZFFramework More...
#include "ZFCoreTypeDef.h"
Go to the source code of this file.
Functions | |
template<typename T_Int> | |
zfbool | zfsFromIntT (zfstring &s, T_Int n, zfindex radix=10, zfbool useUpperCase=_ZFT_t_zftrue) |
convert integer number (int, long, etc) to string | |
template<typename T_Int> | |
zfstring | zfsFromInt (T_Int n, zfindex radix=10, zfbool useUpperCase=_ZFT_t_zftrue) |
see zfsFromIntT | |
template<typename T_Int> | |
zfbool | zfsToIntT (T_Int &ret, const zfchar *src, zfindex srcLen=((zfindex) -1), zfindex radix=10, zfbool allowNegative=_ZFT_t_zftrue) |
convert string to int, return error position if failed, or null if success | |
template<typename T_Int> | |
T_Int | zfsToInt (const zfchar *src, zfindex srcLen=((zfindex) -1), zfindex radix=10, zfbool allowNegative=_ZFT_t_zftrue) |
see zfsToIntT | |
zfint | zfsToInt (const zfchar *src, zfindex srcLen=((zfindex) -1), zfindex radix=10, zfbool allowNegative=_ZFT_t_zftrue) |
see zfsToIntT | |
template<typename T_Float> | |
zfbool | zfsFromFloatT (zfstring &s, T_Float n) |
convert float number (int, long, etc) to string | |
template<typename T_Float> | |
zfstring | zfsFromFloat (T_Float n) |
see zfsFromFloatT | |
template<typename T_Float> | |
zfbool | zfsToFloatT (T_Float &ret, const zfchar *src, zfindex srcLen=((zfindex) -1)) |
convert string to float | |
template<typename T_Float> | |
T_Float | zfsToFloat (const zfchar *src, zfindex srcLen=((zfindex) -1)) |
see zfsToFloatT | |
zffloat | zfsToFloat (const zfchar *src, zfindex srcLen=((zfindex) -1)) |
see zfsToFloatT | |
zfbool | zfsFromPointerT (zfstring &s, const void *p) |
convert pointer value to string | |
zfstring | zfsFromPointer (const void *p) |
see zfsFromPointerT | |
utilities for ZFFramework
zfbool zfsFromIntT | ( | zfstring & | s, |
T_Int | n, | ||
zfindex | radix = 10, | ||
zfbool | useUpperCase = _ZFT_t_zftrue ) |
convert integer number (int, long, etc) to string
integer number can be signed or unsigned, whatever your compiler support
typical usage:
zfbool zfsToIntT | ( | T_Int & | ret, |
const zfchar * | src, | ||
zfindex | srcLen = ((zfindex)-1), | ||
zfindex | radix = 10, | ||
zfbool | allowNegative = _ZFT_t_zftrue ) |
convert string to int, return error position if failed, or null if success
it's your responsibility to make sure the template int type is correct, otherwise, the result may be unexpected (for example, specify a short int type while numbers in src is too long)
convert float number (int, long, etc) to string
float number can be any type such as float, double, long double, whatever your compiler support
for typical usage, see zfsFromIntT
zfbool zfsToFloatT | ( | T_Float & | ret, |
const zfchar * | src, | ||
zfindex | srcLen = ((zfindex)-1) ) |
convert string to float
it's your responsibility to make sure int type is correct, otherwise, the result may be unexpected
for typical usage, see zfsToIntT