ZFFramework
Loading...
Searching...
No Matches
Using string

ZFFramework use these string types:

  • const zfchar *
    C-style string, use just like "const char *"
  • zfstring
    C++-style string, use just like std::string
  • v_zfstring
    string wrapped as ZFObject
// common C-style string, best performance
const zfchar *cStyle = "C-style string";
zfchar cStyle2[32] = {0};
zfscpy(cString2, "copied C-style string");
zfLog() << cStyle << " " << cStyle2;
// common C++-style string, high performance yet easy to use
zfstring cppStyle("C++-style string");
zfstring cppStyle2;
cppStyle2 = "copied C++-style string"
zfLog() << cppStyle << " " << cppStyle2.cString();
// string container as object type
zfobj<v_zfstring> zfStyle("object-style string");
zfStyle2->zfv = "copied object-style string";
zfLog() << zfStyle << " " << zfStyle2->zfv;
zfchar * zfscpy(zfchar *dst, const zfchar *src)
strcpy wrapper as zfchar type
Definition ZFCoreTypeDef_CharType.h:148
_ZFT_t_zfchar zfchar
char wrapper
Definition ZFCoreTypeDef_CharType.h:17
#define zfLog(...)
thread-safe log utility
Definition ZFLog.h:64
ZFV zfv(void) const
see ZFV
Definition zfautoFwd.h:127
util class to alloc and hold ZFObject type
Definition ZFObjectAutoPtr.h:163
const T_Char * cString(void) const
access string value
Definition ZFCoreString.h:384


by default, all strings in ZFFramework use UTF-8 as string encoding