commit 2025-10-10 06:18 add ZftMakeStr(ARR_SaveCStr, ZTypIntUL AUL_Int) etc : ZCppMain/ZMainHead.H etc

This commit is contained in:
2025-10-10 06:18:09 +09:00
parent 7af3c774e4
commit 278eeaefcf
4 changed files with 136 additions and 28 deletions

View File

@ -5476,10 +5476,10 @@ namespace ZNsMain
#ifdef _WIN #ifdef _WIN
ZTypInt VI_ResultSize = ZTypInt VI_ResultSize =
( ::sprintf(VCA_BuffParam, "%I64u", ALL_Long) ); ( ::sprintf(VCA_BuffParam, "%I64d", ALL_Long) );
#else #else
ZTypInt VI_ResultSize = ZTypInt VI_ResultSize =
( ::sprintf(VCA_BuffParam, "%llu" , ALL_Long) ); ( ::sprintf(VCA_BuffParam, "%lld" , ALL_Long) );
#endif #endif
return ARR_SaveCStr.append return ARR_SaveCStr.append
(VCA_BuffParam, VI_ResultSize); (VCA_BuffParam, VI_ResultSize);
@ -5492,16 +5492,100 @@ namespace ZNsMain
#ifdef _WIN #ifdef _WIN
ZTypInt VI_ResultSize = ::swprintf ZTypInt VI_ResultSize = ::swprintf
(VCA_BuffParam, CI_BuffSize, L"%I64u", ALL_Long) ; (VCA_BuffParam, CI_BuffSize, L"%I64d", ALL_Long) ;
#else #else
ZTypInt VI_ResultSize = ::swprintf ZTypInt VI_ResultSize = ::swprintf
(VCA_BuffParam, CI_BuffSize, L"%llu" , ALL_Long) ; (VCA_BuffParam, CI_BuffSize, L"%lld" , ALL_Long) ;
#endif #endif
return ARR_SaveCStr.append return ARR_SaveCStr.append
(VCA_BuffParam, VI_ResultSize); (VCA_BuffParam, VI_ResultSize);
}/* }/*
template<> wstring& ZftMakeStr(wstring& ARR_SaveCStr, ZTypLLong ALL_Long)*/ template<> wstring& ZftMakeStr(wstring& ARR_SaveCStr, ZTypLLong ALL_Long)*/
template<> string& ZftMakeStr(string& ARR_SaveCStr, ZTypIntUI AUI_Int)
{
ZTycInt CI_BuffSize = 31 ;
ZTypChar VCA_BuffParam[CI_BuffSize] ;
ZTypInt VI_ResultSize =
( ::sprintf(VCA_BuffParam, "%u" , AUI_Int) );
return ARR_SaveCStr.append
(VCA_BuffParam, VI_ResultSize);
}/*
template<> string& ZftMakeStr(string& ARR_SaveCStr, ZTypIntUI AUI_Int)*/
template<> wstring& ZftMakeStr(wstring& ARR_SaveCStr, ZTypIntUI AUI_Int)
{
ZTycInt CI_BuffSize = 31 ;
ZTypCharW VCA_BuffParam[CI_BuffSize] ;
ZTypInt VI_ResultSize = ::swprintf
(VCA_BuffParam, CI_BuffSize, L"%u" , AUI_Int) ;
return ARR_SaveCStr.append
(VCA_BuffParam, VI_ResultSize);
}/*
template<> wstring& ZftMakeStr(wstring& ARR_SaveCStr, ZTypIntUI AUI_Int)*/
template<> string& ZftMakeStr(string& ARR_SaveCStr, ZTypIntUL AUL_Int)
{
ZTycInt CI_BuffSize = 41 ;
ZTypChar VCA_BuffParam[CI_BuffSize] ;
ZTypInt VI_ResultSize =
( ::sprintf(VCA_BuffParam, "%lu" , AUL_Int) );
return ARR_SaveCStr.append
(VCA_BuffParam, VI_ResultSize);
}/*
template<> string& ZftMakeStr(string& ARR_SaveCStr, ZTypIntUL AUL_Int)*/
template<> wstring& ZftMakeStr(wstring& ARR_SaveCStr, ZTypIntUL AUL_Int)
{
ZTycInt CI_BuffSize = 41 ;
ZTypCharW VCA_BuffParam[CI_BuffSize] ;
ZTypInt VI_ResultSize = ::swprintf
(VCA_BuffParam, CI_BuffSize, L"%lu" , AUL_Int) ;
return ARR_SaveCStr.append
(VCA_BuffParam, VI_ResultSize);
}/*
template<> wstring& ZftMakeStr(wstring& ARR_SaveCStr, ZTypIntUL AUL_Int)*/
template<> string& ZftMakeStr(string& ARR_SaveCStr, ZTypIntULL AULL_Int)
{
ZTycInt CI_BuffSize = 41 ;
ZTypChar VCA_BuffParam[CI_BuffSize] ;
#ifdef _WIN
ZTypInt VI_ResultSize =
( ::sprintf(VCA_BuffParam, "%I64u", AULL_Int) );
#else
ZTypInt VI_ResultSize =
( ::sprintf(VCA_BuffParam, "%llu" , AULL_Int) );
#endif
return ARR_SaveCStr.append
(VCA_BuffParam, VI_ResultSize);
}/*
template<> string& ZftMakeStr(string& ARR_SaveCStr, ZTypIntULL AULL_Int)*/
template<> wstring& ZftMakeStr(wstring& ARR_SaveCStr, ZTypIntULL AULL_Int)
{
ZTycInt CI_BuffSize = 41 ;
ZTypCharW VCA_BuffParam[CI_BuffSize] ;
#ifdef _WIN
ZTypInt VI_ResultSize = ::swprintf
(VCA_BuffParam, CI_BuffSize, L"%I64u", AULL_Int) ;
#else
ZTypInt VI_ResultSize = ::swprintf
(VCA_BuffParam, CI_BuffSize, L"%llu" , AULL_Int) ;
#endif
return ARR_SaveCStr.append
(VCA_BuffParam, VI_ResultSize);
}/*
template<> wstring& ZftMakeStr(wstring& ARR_SaveCStr, ZTypIntULL AULL_Int)*/
template<> string& ZftMakeStr(string& ARR_SaveCStr, double AD_Double) template<> string& ZftMakeStr(string& ARR_SaveCStr, double AD_Double)
{ {
ZTycInt CI_BuffSize=51 ; ZTycInt CI_BuffSize=51 ;

View File

@ -7543,14 +7543,26 @@ namespace ZNsMain
{ return ARR_SaveCStr(AC_Char ); } { return ARR_SaveCStr(AC_Char ); }
_ZCSTRINGBASE_ARG_ _ZCSTRINGBASE_& ZftMakeStr _ZCSTRINGBASE_ARG_ _ZCSTRINGBASE_& ZftMakeStr
( _ZCSTRINGBASE_& ARR_SaveCStr, int AI_IntI ) ( _ZCSTRINGBASE_& ARR_SaveCStr, ZTypIntI AI_IntI )
{ return ARR_SaveCStr(AI_IntI ); } { return ARR_SaveCStr(AI_IntI ); }
_ZCSTRINGBASE_ARG_ _ZCSTRINGBASE_& ZftMakeStr _ZCSTRINGBASE_ARG_ _ZCSTRINGBASE_& ZftMakeStr
( _ZCSTRINGBASE_& ARR_SaveCStr, long AL_Long ) ( _ZCSTRINGBASE_& ARR_SaveCStr, ZTypIntL AL_Long )
{ return ARR_SaveCStr(AL_Long ); } { return ARR_SaveCStr(AL_Long ); }
_ZCSTRINGBASE_ARG_ _ZCSTRINGBASE_& ZftMakeStr _ZCSTRINGBASE_ARG_ _ZCSTRINGBASE_& ZftMakeStr
( _ZCSTRINGBASE_& ARR_SaveCStr, ZTypIntUI AUI_Int )
{ return ARR_SaveCStr(AUI_Int ); }
_ZCSTRINGBASE_ARG_ _ZCSTRINGBASE_& ZftMakeStr
( _ZCSTRINGBASE_& ARR_SaveCStr, ZTypIntUL AUL_Int )
{ return ARR_SaveCStr(AUL_Int ); }
_ZCSTRINGBASE_ARG_ _ZCSTRINGBASE_& ZftMakeStr
( _ZCSTRINGBASE_& ARR_SaveCStr, ZTypIntULL AULL_Int )
{ return ARR_SaveCStr(AULL_Int ); }
_ZCSTRINGBASE_ARG_ _ZCSTRINGBASE_& ZftMakeStr
( _ZCSTRINGBASE_& ARR_SaveCStr, double AD_Double ) ( _ZCSTRINGBASE_& ARR_SaveCStr, double AD_Double )
{ return ARR_SaveCStr(AD_Double ); } { return ARR_SaveCStr(AD_Double ); }

View File

@ -552,12 +552,12 @@ namespace ZNsMain
_ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr _ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr
( _ZCSTRINGSTD_& ARR_SaveCStr, const _ZCSTRINGSTD_& AR_DataCStr) ( _ZCSTRINGSTD_& ARR_SaveCStr, const _ZCSTRINGSTD_& AR_DataCStr)
{ return ARR_SaveCStr(AR_DataCStr); } { return ARR_SaveCStr(AR_DataCStr ); }
_ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr _ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr
( _ZCSTRINGSTD_& ARR_SaveCStr, const typename ( _ZCSTRINGSTD_& ARR_SaveCStr, const typename
_ZCSTRINGSTD_::ZCChars& AR_DataCStr ) _ZCSTRINGSTD_::ZCChars& AR_DataCStr )
{ return ARR_SaveCStr(AR_DataCStr); } { return ARR_SaveCStr(AR_DataCStr ); }
_ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr _ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr
( _ZCSTRINGSTD_& ARR_SaveCStr, typename ( _ZCSTRINGSTD_& ARR_SaveCStr, typename
@ -565,14 +565,26 @@ namespace ZNsMain
{ return ARR_SaveCStr(AC_Char ); } { return ARR_SaveCStr(AC_Char ); }
_ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr _ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr
( _ZCSTRINGSTD_& ARR_SaveCStr, int AI_IntI ) ( _ZCSTRINGSTD_& ARR_SaveCStr, ZTypInt AI_IntI )
{ return ARR_SaveCStr(AI_IntI ); } { return ARR_SaveCStr(AI_IntI ); }
_ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr _ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr
( _ZCSTRINGSTD_& ARR_SaveCStr, long AL_Long ) ( _ZCSTRINGSTD_& ARR_SaveCStr, ZTypIntL AL_Long )
{ return ARR_SaveCStr(AL_Long ); } { return ARR_SaveCStr(AL_Long ); }
_ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr _ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr
( _ZCSTRINGSTD_& ARR_SaveCStr, ZTypIntUI AUI_Int )
{ return ARR_SaveCStr(AUI_Int ); }
_ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr
( _ZCSTRINGSTD_& ARR_SaveCStr, ZTypIntUL AUL_Long )
{ return ARR_SaveCStr(AUL_Long ); }
_ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr
( _ZCSTRINGSTD_& ARR_SaveCStr, ZTypIntULL AULL_Long )
{ return ARR_SaveCStr(AULL_Long ); }
_ZCSTRINGSTD_ARG_ _ZCSTRINGSTD_& ZftMakeStr
( _ZCSTRINGSTD_& ARR_SaveCStr, double AD_Double ) ( _ZCSTRINGSTD_& ARR_SaveCStr, double AD_Double )
{ return ARR_SaveCStr(AD_Double ); } { return ARR_SaveCStr(AD_Double ); }

View File

@ -156,14 +156,14 @@ namespace ZNsMain
cout<<"*****************************************************"<<endl; cout<<"*****************************************************"<<endl;
ZftMakeStr(VO_ZCStringStd , 1234); ZftMakeStr(VO_ZCStringStd , ZTypIntULL(1234));
ZftMakeStr(VO_ZCStringStd , ZCCharView("--")); ZftMakeStr(VO_ZCStringStd , ZCCharView("--"));
ZftMakeStr(VO_ZCStringStd , double(10.01)); ZftMakeStr(VO_ZCStringStd , double(10.01));
ZftMakeStr(VO_ZCStringStd , true); ZftMakeStr(VO_ZCStringStd , true);
ZftMakeStr(VO_ZCStringStd , 'Z'); ZftMakeStr(VO_ZCStringStd , 'Z');
ZftMakeStr(VO_ZCStringStd , ZCCharView("_Z_")); ZftMakeStr(VO_ZCStringStd , ZCCharView("_Z_"));
ZftMakeStr(VO_ZCStringStdW, 1234); ZftMakeStr(VO_ZCStringStdW, ZTypIntULL(1234));
ZftMakeStr(VO_ZCStringStdW, ZCCharViewSW(L"--")); ZftMakeStr(VO_ZCStringStdW, ZCCharViewSW(L"--"));
ZftMakeStr(VO_ZCStringStdW, double(10.01)); ZftMakeStr(VO_ZCStringStdW, double(10.01));
ZftMakeStr(VO_ZCStringStdW, true); ZftMakeStr(VO_ZCStringStdW, true);