commit 2025-10-09 10:41 bug fix about wchar_t in ZCppMain/ZtCStringEx.H and add ZftAtoI(), ZftAotL() etc in ZCppMain/ZMainHead.H
This commit is contained in:
@ -20,7 +20,8 @@ namespace ZNsMain
|
||||
|
||||
typedef ZtCStringBase<char> ZCStringBase ;
|
||||
typedef ZtCStringBase<wchar_t> ZCStringBaseW ;
|
||||
typedef ZCStringBase::ZCCharView ZCCharView ;
|
||||
typedef ZCStringBase ::ZCCharView ZCCharView ;
|
||||
typedef ZCStringBaseW::ZCCharView ZCCharViewW ;
|
||||
typedef ZtCCharType<ZCStringBase> ZCCharType ;
|
||||
typedef ZtCCharType<ZCStringBaseW> ZCCharTypeW ;
|
||||
|
||||
@ -61,19 +62,35 @@ namespace ZNsMain
|
||||
ZCStringBaseW VO_ZCStringBaseW;
|
||||
ZCStringStdW VO_ZCStringStdW ;
|
||||
|
||||
VO_ZCStringBaseW(123);
|
||||
cout<<"* after VO_ZCStringBaseW(123)"<<endl;
|
||||
cout<<"# '.' ascii code ="<<int('.')<<endl;
|
||||
cout<<"*****************************************************"<<endl;
|
||||
|
||||
VO_ZCStringBaseW=123;
|
||||
cout<<"* after VO_ZCStringBaseW=123"<<endl;
|
||||
cout<<"# VO_ZCStringBaseW[0]="<<int(VO_ZCStringBaseW[0])<<endl;
|
||||
cout<<"# VO_ZCStringBaseW[1]="<<int(VO_ZCStringBaseW[1])<<endl;
|
||||
cout<<"# VO_ZCStringBaseW[2]="<<int(VO_ZCStringBaseW[2])<<endl;
|
||||
cout<<"*****************************************************"<<endl;
|
||||
cout<<"# VO_ZCStringBaseW.GetLong()="<<VO_ZCStringBaseW.GetLong()<<endl;
|
||||
cout<<"*****************************************************"<<endl;
|
||||
|
||||
VO_ZCStringStdW(1.2);
|
||||
cout<<"* after VO_ZCStringStdW(1.2)"<<endl;
|
||||
VO_ZCStringBaseW=2.3;
|
||||
cout<<"* after VO_ZCStringBaseW=2.3"<<endl;
|
||||
cout<<"# VO_ZCStringBaseW[0]="<<int(VO_ZCStringBaseW[0])<<endl;
|
||||
cout<<"# VO_ZCStringBaseW[1]="<<int(VO_ZCStringBaseW[1])<<endl;
|
||||
cout<<"# VO_ZCStringBaseW[2]="<<int(VO_ZCStringBaseW[2])<<endl;
|
||||
cout<<"*****************************************************"<<endl;
|
||||
cout<<"# VO_ZCStringBaseW.GetDouble()="<<VO_ZCStringBaseW.GetDouble()<<endl;
|
||||
cout<<"*****************************************************"<<endl;
|
||||
|
||||
VO_ZCStringStdW=1.2;
|
||||
cout<<"* after VO_ZCStringStdW=1.2"<<endl;
|
||||
cout<<"# VO_ZCStringStdW [0]="<<int(VO_ZCStringStdW[0])<<endl;
|
||||
cout<<"# VO_ZCStringStdW [1]="<<int(VO_ZCStringStdW[1])<<endl;
|
||||
cout<<"# VO_ZCStringStdW [2]="<<int(VO_ZCStringStdW[2])<<endl;
|
||||
cout<<"*****************************************************"<<endl;
|
||||
cout<<"# VO_ZCStringStdW.GetDouble()="<<VO_ZCStringStdW.GetDouble()<<endl;
|
||||
cout<<"*****************************************************"<<endl;
|
||||
|
||||
|
||||
const ZCCharView CO_ZCCharView("1234AA5678AA90abcAAss");
|
||||
@ -113,6 +130,7 @@ namespace ZNsMain
|
||||
|
||||
|
||||
ZftMakeStr(VO_ZCStringStd, 1234);
|
||||
ZftMakeStr(VO_ZCStringStd, ZCCharView("--"));
|
||||
ZftMakeStr(VO_ZCStringStd, double(10.01));
|
||||
ZftMakeStr(VO_ZCStringStd, true);
|
||||
ZftMakeStr(VO_ZCStringStd,'Z');
|
||||
@ -143,6 +161,11 @@ namespace ZNsMain
|
||||
cout<<"# "<<VO_ZCStringStd<<endl;
|
||||
cout<<"*****************************************************"<<endl;
|
||||
|
||||
cout<<"* after ()(ZCCharViewW('_AZ'))"<<endl;
|
||||
VO_ZCStringStd(ZCCharView("_AZ"));
|
||||
cout<<"# "<<VO_ZCStringStd<<endl;
|
||||
cout<<"*****************************************************"<<endl;
|
||||
|
||||
|
||||
return 0;
|
||||
}/*
|
||||
|
Reference in New Issue
Block a user