commit 2025-08-28 20:23 add ZftMakeStr() in ZCppMain/ZMainHead.H and ZtCStringEx.H
This commit is contained in:
@ -3681,6 +3681,63 @@ namespace ZNsCPP */
|
||||
namespace ZNsMain
|
||||
{
|
||||
|
||||
template<typename TString, typename TObject>
|
||||
TString& ZftMakeStr(TString& ARR_SaveCStr, TObject AO_Object)
|
||||
{ return ARR_SaveCStr; }
|
||||
////////////////////////////////////////////
|
||||
|
||||
|
||||
template<> string& ZftMakeStr(string& ARR_SaveCStr, const string& AR_DataCStr)
|
||||
{
|
||||
ARR_SaveCStr.append(AR_DataCStr); return ARR_SaveCStr;
|
||||
}/*
|
||||
template<> string& ZftMakeStr(string& ARR_SaveCStr, const string& AR_DataCStr)*/
|
||||
|
||||
template<> string& ZftMakeStr(string& ARR_SaveCStr, long AL_Long)
|
||||
{
|
||||
const int CI_BuffSize = 31 ;
|
||||
char VCA_BuffParam[CI_BuffSize] ;
|
||||
|
||||
int VI_ResultSize =
|
||||
::sprintf(VCA_BuffParam, "%ld", AL_Long);
|
||||
|
||||
ARR_SaveCStr.append
|
||||
(VCA_BuffParam, VI_ResultSize);
|
||||
|
||||
return ARR_SaveCStr;
|
||||
}/*
|
||||
template<> string& ZftMakeStr(string& ARR_SaveCStr, long AL_Long)*/
|
||||
|
||||
template<> string& ZftMakeStr(string& ARR_SaveCStr, double AD_Double)
|
||||
{
|
||||
const int CI_BuffSize=51 ;
|
||||
char VCA_BuffParam[CI_BuffSize];
|
||||
|
||||
int VI_ResultSize = ::sprintf
|
||||
(
|
||||
VCA_BuffParam, "%f", AD_Double
|
||||
);
|
||||
/////////////////////////////
|
||||
|
||||
ARR_SaveCStr.append
|
||||
(VCA_BuffParam, VI_ResultSize);
|
||||
|
||||
return ARR_SaveCStr;
|
||||
}/*
|
||||
template<> string& ZftMakeStr(string& ARR_SaveCStr, double AD_Double)*/
|
||||
|
||||
template<> string& ZftMakeStr(string& ARR_SaveCStr, bool AB_Bool)
|
||||
{
|
||||
if (AB_Bool)
|
||||
ARR_SaveCStr.append("true" );
|
||||
else ARR_SaveCStr.append("false");
|
||||
|
||||
return ARR_SaveCStr;
|
||||
}/*
|
||||
template<> string& ZftMakeStr(string& ARR_SaveCStr, bool AB_Bool)*/
|
||||
|
||||
|
||||
|
||||
template<typename TStringData> TStringData& ZftConvertXhtml(TStringData& ARRoCString)
|
||||
{
|
||||
/* 데이타를 그대로 클라이언트에 전송하면, HTML 태그와
|
||||
|
Reference in New Issue
Block a user