commit 2025-10-08 20:43 add ZtCCharType in ZCppMain/ZMainHead.H

This commit is contained in:
2025-10-08 22:43:47 +09:00
parent 443ebf4fd1
commit 6974c13d16
4 changed files with 182 additions and 14 deletions

View File

@ -14,8 +14,19 @@ namespace ZNsMain
namespace ZNsExam
{
typedef ZtCStringBase<char> CStringBase;
typedef CStringBase::ZCCharView ZCCharView ;
typedef ZtCStringBase<char> ZCStringBase ;
typedef ZtCStringBase<wchar_t> ZCStringBaseW ;
typedef ZCStringBase::ZCCharView ZCCharView ;
typedef ZtCCharType<ZCStringBase> ZCCharType ;
typedef ZtCCharType<ZCStringBaseW> ZCCharTypeW ;
typedef ZCCharType ::TypeChar TypeChar ;
typedef ZCCharTypeW::TypeChar TypeCharW ;
typedef ZCCharType ::TypeInt TypeCharInt ;
typedef ZCCharTypeW::TypeInt TypeCharIntW ;
const int CI_ByteSize = ZCCharType ::CI_ByteSize ;
const int CI_ByteSizeW= ZCCharTypeW::CI_ByteSize ;
template<typename TDummy=void*> class ZtCExamCStringBase_000
@ -24,9 +35,29 @@ namespace ZNsMain
static int Main(int AI_ArgCnt=0, char* APP_ArgVal[]=0)
{
cout<<"# TypeChar ="<<typeid(TypeChar ).name()<<endl;
cout<<"# TypeCharW ="<<typeid(TypeCharW ).name()<<endl;
cout<<"# TypeCharInt ="<<typeid(TypeCharInt ).name()<<endl;
cout<<"# TypeCharIntW="<<typeid(TypeCharIntW).name()<<endl;
cout<<"# CI_ByteSize ="<<CI_ByteSize <<endl;
cout<<"# CI_ByteSizeW="<<CI_ByteSizeW <<endl;
cout<<"# ZCStringBase ::TypeCharInt="<<typeid(ZCStringBase ::TypeCharInt).name()<<endl;
cout<<"# ZCStringBaseW::TypeCharInt="<<typeid(ZCStringBaseW::TypeCharInt).name()<<endl;
cout<<"# ZCStringBase ::traits_type::char_type="<<typeid(ZCStringBase ::traits_type::char_type).name()<<endl;
cout<<"# ZCStringBaseW::traits_type::char_type="<<typeid(ZCStringBaseW::traits_type::char_type).name()<<endl;
cout<<"# ZCStringBase ::traits_type::int_type ="<<typeid(ZCStringBase ::traits_type::int_type ).name()<<endl;
cout<<"# ZCStringBaseW::traits_type::int_type ="<<typeid(ZCStringBaseW::traits_type::int_type ).name()<<endl;
cout<<"# ZCStringBase ::traits_type="<<typeid(ZCStringBase ::traits_type).name()<<endl;
cout<<"# ZCStringBaseW::traits_type="<<typeid(ZCStringBaseW::traits_type).name()<<endl;
cout<<"*****************************************************"<<endl;
const ZCCharView CO_ZCCharView("1234AA5678AA90abcAAss");
CStringBase VO_ZCStringStd(CO_ZCCharView);
ZCStringBase VO_ZCStringStd(CO_ZCCharView);
cout<<"# "<<VO_ZCStringStd<<endl;
cout<<"* after Replace('12', '***')"<<endl;