6#ifndef _ZFI_ZFCoreDataPairSplit_h_
7#define _ZFI_ZFCoreDataPairSplit_h_
43template<
typename T_
int>
57 , desiredCountOrIndexMax
70 if(!
zfsToIntT(tmp, src + splited[i].start, splited[i].count, 10,
zftrue)) {
81template<
typename T_
float>
95 , desiredCountOrIndexMax
107 if(!
zfsToFloatT(tmp, src + splited[i].start, splited[i].count)) {
zfbool ZFCoreDataPairSplitFloat(ZFCoreArray< T_float > &outData, zfindex desiredCountOrIndexMax, const zfchar *src, zfindex srcLen=((zfindex) -1), const zfchar *separatorTokens=",", const zfchar *leftTokens="(", const zfchar *rightTokens=")", zfbool allowEmptyItem=_ZFT_t_zffalse)
split data to float array format, see ZFCoreDataPairSplitString
Definition ZFCoreDataPairSplit.h:82
zfbool ZFCoreDataPairSplitString(ZFCoreArray< ZFIndexRange > &outData, zfindex desiredCountOrIndexMax, const zfchar *src, zfindex srcLen=((zfindex) -1), const zfchar *separatorTokens=",", const zfchar *leftTokens="(", const zfchar *rightTokens=")", zfbool allowEmptyItem=_ZFT_t_zffalse)
split data pair such as "(a, b, c)" from a string
zfbool ZFCoreDataPairSplitInt(ZFCoreArray< T_int > &outData, zfindex desiredCountOrIndexMax, const zfchar *src, zfindex srcLen=((zfindex) -1), const zfchar *separatorTokens=",", const zfchar *leftTokens="(", const zfchar *rightTokens=")", zfbool allowEmptyItem=_ZFT_t_zffalse)
split data to int array format, see ZFCoreDataPairSplitString
Definition ZFCoreDataPairSplit.h:44
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
zfbool zfsToFloatT(T_Float &ret, const zfchar *src, zfindex srcLen=((zfindex) -1))
convert string to float
Definition ZFCoreStringConvert.h:218
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
Definition ZFCoreStringConvert.h:93
string utilities for ZFFramework
_ZFT_t_zfchar zfchar
char wrapper
Definition ZFCoreTypeDef_CharType.h:17
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define ZF_IN_OPT
dummy macro that shows the param used as optional input
Definition ZFCoreTypeDef_ClassType.h:184
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:196
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
_ZFT_t_zfindex zfindex
similar to size_t, used for index and size only
Definition ZFCoreTypeDef_CoreType.h:154
#define zftrue
bool true type
Definition ZFCoreTypeDef_CoreType.h:107
#define zfindexMax()
(zfindex)-1, indicate a max index value, see zfindex
Definition ZFCoreTypeDef_CoreType.h:159
#define zffalse
bool false type
Definition ZFCoreTypeDef_CoreType.h:111
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
light weight array
Definition ZFCoreArray.h:331
virtual zfindex count(void) const
element count of this array
Definition ZFCoreArray.h:920