ZFFramework
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
ZFCoreTypeDef_CharType.h File Reference

types for ZFFramework More...

#include "ZFCoreTypeDef_CoreType.h"
#include <cstring>
#include <cstdlib>

Go to the source code of this file.

Macros

#define zfcharIsLetterLowerCase(c)
 true if 'a' ~ 'z'
 
#define zfcharIsLetterUpperCase(c)
 true if 'A' ~ 'Z'
 
#define zfcharIsNumber(c)
 true if '0' ~ '9'
 
#define zfcharIsHexNumberLowerCase(c)
 true if '0' ~ '9' or 'a' ~ 'f'
 
#define zfcharIsHexNumberUpperCase(c)
 true if '0' ~ '9' or 'A' ~ 'F'
 
#define zfcharIsHexNumber(c)
 true if '0' ~ '9' or 'a' ~ 'f' or 'A' ~ 'F'
 
#define zfcharIsSpace(c)
 true if char is space or tab
 
#define zfcharIsEndl(c)
 true if char is '\r' or '\n'
 
#define zfcharSkipSpace(p, end)
 move p to skip spaces and tabs, up to end
 
#define zfcharSkipEndl(p, end)
 move p to skip spaces and tabs, up to end
 
#define zfcharSkipSpaceAndEndl(p, end)
 move p to skip spaces and tabs, up to end
 

Typedefs

typedef _ZFT_t_zfchar zfchar
 char wrapper
 
typedef _ZFT_t_zfchar zft_zfchar
 primitive number type, use only if necessary, for app, use zfchar instead
 

Functions

zfindex zfcharGetSize (const zfchar *p)
 get logical char's size, see zfcharMoveNext
 
template<typename T_CharString >
void zfcharMoveNext (T_CharString &p)
 move to next logical char
 
template<typename T_Str , typename T_CharString >
void zfcharAppendAndMoveNext (T_Str &s, T_CharString &p)
 append logical char from p to s, then move p to next char, see zfcharMoveNext
 
zfindex zfslen (const zfchar *s)
 strlen wrapper as zfchar type
 
zfcharzfscpy (zfchar *dst, const zfchar *src)
 strcpy wrapper as zfchar type
 
zfint zfscmp (const zfchar *s1, const zfchar *s2)
 strcmp wrapper as zfchar type
 
zfint zfsicmp (const zfchar *s1, const zfchar *s2)
 stricmp wrapper as zfchar type, no locale supported
 
zfint zfsncmp (const zfchar *s1, const zfchar *s2, zfindex count)
 strncmp wrapper as zfchar type
 
zfint zfsnicmp (const zfchar *s1, const zfchar *s2, zfindex count)
 strnicmp wrapper as zfchar type, no locale supported
 

Detailed Description

types for ZFFramework

Function Documentation

◆ zfcharMoveNext()

template<typename T_CharString >
void zfcharMoveNext ( T_CharString & p)
inline

move to next logical char

since zfchar's encoding may take more than one char unit to store a logical char, you can't simply use "++p"
this macro take one param, which should be a pointer var of (zfchar *) or (const zfchar *), and this macro would move the pointer to next logical char