commit 2025-10-18 11:37 edit a bit ZCppMain/ZtCMainChars.H
This commit is contained in:
@ -291,8 +291,8 @@ namespace ZNsMain
|
|||||||
|
|
||||||
static int Minus /*#################################################*/
|
static int Minus /*#################################################*/
|
||||||
(
|
(
|
||||||
const TypeChar* APC_Left , const TypeChar* APC_Right,
|
TypeCharC* APC_Left , TypeCharC* APC_Right,
|
||||||
TypeLength AL_LeftLength, TypeLength AL_RightLength
|
TypeLength AL_LeftLength, TypeLength AL_RightLength
|
||||||
)
|
)
|
||||||
/*##################################################################*/
|
/*##################################################################*/
|
||||||
{
|
{
|
||||||
@ -350,8 +350,8 @@ namespace ZNsMain
|
|||||||
}/*
|
}/*
|
||||||
static int Minus #@###################################################
|
static int Minus #@###################################################
|
||||||
(
|
(
|
||||||
const TypeChar* APC_Left , const TypeChar* APC_Right,
|
TypeCharC* APC_Left , TypeCharC* APC_Right,
|
||||||
TypeLength AL_LeftLength, TypeLength AL_RightLength
|
TypeLength AL_LeftLength, TypeLength AL_RightLength
|
||||||
)
|
)
|
||||||
####################################################################*/
|
####################################################################*/
|
||||||
|
|
||||||
@ -547,8 +547,12 @@ namespace ZNsMain
|
|||||||
}/*
|
}/*
|
||||||
template<typename TTyChars> static bool DoClose(const TTyChars& AR_CCharsOrigin, const TTyChars& AR_CCharsSearch) */
|
template<typename TTyChars> static bool DoClose(const TTyChars& AR_CCharsOrigin, const TTyChars& AR_CCharsSearch) */
|
||||||
|
|
||||||
static bool DoClose(
|
static bool DoClose /*//////////////////////////////////////*/
|
||||||
TypeCharC* APC_Origin, TypeCharC* APC_Search, TypeLength AL_OriginLength, TypeLength AL_SearchLength)
|
(
|
||||||
|
TypeCharC* APC_Origin , TypeCharC* APC_Search,
|
||||||
|
TypeLength AL_OriginLength, TypeLength AL_SearchLength
|
||||||
|
)
|
||||||
|
/*##########################################################*/
|
||||||
{
|
{
|
||||||
const bool CB_IsBad = /*:::::::::::::::*/
|
const bool CB_IsBad = /*:::::::::::::::*/
|
||||||
(
|
(
|
||||||
@ -569,8 +573,12 @@ namespace ZNsMain
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}/*
|
}/*
|
||||||
static bool DoClose(
|
static bool DoClose //////////////////////////////////////////
|
||||||
TypeCharC* APC_Origin, TypeCharC* APC_Search, TypeLength AL_OriginLength, TypeLength AL_SearchLength)*/
|
(
|
||||||
|
TypeCharC* APC_Origin , TypeCharC* APC_Search,
|
||||||
|
TypeLength AL_OriginLength, TypeLength AL_SearchLength
|
||||||
|
)
|
||||||
|
############################################################*/
|
||||||
|
|
||||||
|
|
||||||
template<typename TTyChars> static bool DoEndLinear(
|
template<typename TTyChars> static bool DoEndLinear(
|
||||||
@ -816,15 +824,17 @@ namespace ZNsMain
|
|||||||
//////////// ) ////////////////////////////////////////////////*/
|
//////////// ) ////////////////////////////////////////////////*/
|
||||||
|
|
||||||
|
|
||||||
static TypeLength FindPosEsc( ////////////////////////////////////
|
static TypeLength FindPosEsc /////////////////////////////////////
|
||||||
TypeCharC* APC_Origin ,
|
(
|
||||||
TypeCharC* APC_Search ,
|
TypeCharC* APC_Origin ,
|
||||||
TypeCharC* APC_Escape ,
|
TypeCharC* APC_Search ,
|
||||||
TypeLength AL_OriginLen ,
|
TypeCharC* APC_Escape ,
|
||||||
TypeLength AL_SearchLen ,
|
TypeLength AL_OriginLen ,
|
||||||
TypeLength AL_EscapeLen ,
|
TypeLength AL_SearchLen ,
|
||||||
TypeLength AL_StartPos=0
|
TypeLength AL_EscapeLen ,
|
||||||
/*//////////*/ ) /////////////////////////////////////////////////
|
TypeLength AL_StartPos=0
|
||||||
|
)
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
{
|
{
|
||||||
if(AL_EscapeLen<1) return ZtCMainChars::FindPos
|
if(AL_EscapeLen<1) return ZtCMainChars::FindPos
|
||||||
(
|
(
|
||||||
@ -841,7 +851,7 @@ namespace ZNsMain
|
|||||||
|
|
||||||
if(CB_IsBad) return -1;
|
if(CB_IsBad) return -1;
|
||||||
|
|
||||||
const TypeChar* VP_Origin = APC_Origin+AL_StartPos ;
|
TypeCharC* VP_Origin = APC_Origin+AL_StartPos ;
|
||||||
bool VB_DoEscape= false ;
|
bool VB_DoEscape= false ;
|
||||||
TypeLength i = 0 ;
|
TypeLength i = 0 ;
|
||||||
TypeLength VL_MaxLoop =
|
TypeLength VL_MaxLoop =
|
||||||
@ -894,15 +904,17 @@ namespace ZNsMain
|
|||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}/*
|
}/*
|
||||||
static TypeLength FindPosEsc( ////////////////////////////////////
|
static TypeLength FindPosEsc /////////////////////////////////////
|
||||||
TypeCharC* APC_Origin ,
|
(
|
||||||
TypeCharC* APC_Search ,
|
TypeCharC* APC_Origin ,
|
||||||
TypeCharC* APC_Escape ,
|
TypeCharC* APC_Search ,
|
||||||
TypeLength AL_OriginLen ,
|
TypeCharC* APC_Escape ,
|
||||||
TypeLength AL_SearchLen ,
|
TypeLength AL_OriginLen ,
|
||||||
TypeLength AL_EscapeLen ,
|
TypeLength AL_SearchLen ,
|
||||||
TypeLength AL_StartPos=0
|
TypeLength AL_EscapeLen ,
|
||||||
////////////// ) ///////////////////////////////////////////////*/
|
TypeLength AL_StartPos=0
|
||||||
|
)
|
||||||
|
////////////////////////////////////////////////////////////////*/
|
||||||
|
|
||||||
|
|
||||||
template<typename TTyChars> static TypeLength FindPosEsc(
|
template<typename TTyChars> static TypeLength FindPosEsc(
|
||||||
@ -919,19 +931,21 @@ namespace ZNsMain
|
|||||||
/* APC_Search 문자열을 찾는데 APC_WrapStart 로 시작한다면 APC_WrapClose
|
/* APC_Search 문자열을 찾는데 APC_WrapStart 로 시작한다면 APC_WrapClose
|
||||||
을 찾고 바로 다음에 APC_Search 이 있어야 그 위치를 반환한다. */
|
을 찾고 바로 다음에 APC_Search 이 있어야 그 위치를 반환한다. */
|
||||||
|
|
||||||
static TypeLength FindPosEscWrap( ////////////////////////////////
|
static TypeLength FindPosEscWrap /////////////////////////////////
|
||||||
TypeCharC* APC_Origin ,
|
(
|
||||||
TypeCharC* APC_Search ,
|
TypeCharC* APC_Origin ,
|
||||||
TypeCharC* APC_Escape ,
|
TypeCharC* APC_Search ,
|
||||||
TypeCharC* APC_WrapStart ,
|
TypeCharC* APC_Escape ,
|
||||||
TypeCharC* APC_WrapClose ,
|
TypeCharC* APC_WrapStart ,
|
||||||
TypeLength AL_OriginLen ,
|
TypeCharC* APC_WrapClose ,
|
||||||
TypeLength AL_SearchLen ,
|
TypeLength AL_OriginLen ,
|
||||||
TypeLength AL_EscapeLen ,
|
TypeLength AL_SearchLen ,
|
||||||
TypeLength AL_WrapStartLen ,
|
TypeLength AL_EscapeLen ,
|
||||||
TypeLength AL_WrapCloseLen ,
|
TypeLength AL_WrapStartLen ,
|
||||||
TypeLength AL_StartPos=0
|
TypeLength AL_WrapCloseLen ,
|
||||||
/*//////////*/ ) ///////////////////////////////////////////////*/
|
TypeLength AL_StartPos=0
|
||||||
|
)
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
{
|
{
|
||||||
const bool CB_IsBad = ///////////////////////
|
const bool CB_IsBad = ///////////////////////
|
||||||
(
|
(
|
||||||
@ -984,46 +998,43 @@ namespace ZNsMain
|
|||||||
}/*
|
}/*
|
||||||
if(CB_DoStart) */
|
if(CB_DoStart) */
|
||||||
|
|
||||||
return ZtCMainChars::FindPos(APC_Origin, APC_Search, AL_OriginLen, AL_SearchLen, AL_StartPos);
|
return ZtCMainChars::FindPos
|
||||||
|
(APC_Origin, APC_Search, AL_OriginLen, AL_SearchLen, AL_StartPos);
|
||||||
}/*
|
}/*
|
||||||
static TypeLength FindPosEscWrap( ////////////////////////////////
|
static TypeLength FindPosEscWrap /////////////////////////////////
|
||||||
TypeCharC* APC_Origin ,
|
(
|
||||||
TypeCharC* APC_Search ,
|
TypeCharC* APC_Origin ,
|
||||||
TypeCharC* APC_Escape ,
|
TypeCharC* APC_Search ,
|
||||||
TypeCharC* APC_WrapStart ,
|
TypeCharC* APC_Escape ,
|
||||||
TypeCharC* APC_WrapClose ,
|
TypeCharC* APC_WrapStart ,
|
||||||
TypeLength AL_OriginLen ,
|
TypeCharC* APC_WrapClose ,
|
||||||
TypeLength AL_SearchLen ,
|
TypeLength AL_OriginLen ,
|
||||||
TypeLength AL_EscapeLen ,
|
TypeLength AL_SearchLen ,
|
||||||
TypeLength AL_WrapStartLen ,
|
TypeLength AL_EscapeLen ,
|
||||||
TypeLength AL_WrapCloseLen ,
|
TypeLength AL_WrapStartLen ,
|
||||||
TypeLength AL_StartPos=0
|
TypeLength AL_WrapCloseLen ,
|
||||||
////////////// ) ///////////////////////////////////////////////*/
|
TypeLength AL_StartPos=0
|
||||||
|
)
|
||||||
|
////////////////////////////////////////////////////////////////*/
|
||||||
|
|
||||||
template<typename TTyChars> static TypeLength FindPosEscWrap( //////
|
template<typename TTyChars> static TypeLength FindPosEscWrap /////
|
||||||
const TTyChars& AR_CCharsOrigin ,
|
(
|
||||||
const TTyChars& AR_CCharsSearch ,
|
const TTyChars& AR_CCharsOrigin ,
|
||||||
const TTyChars& AR_CCharsEscape ,
|
const TTyChars& AR_CCharsSearch ,
|
||||||
const TTyChars& AR_CCharsWrapStart,
|
const TTyChars& AR_CCharsEscape ,
|
||||||
const TTyChars& AR_CCharsWrapClose,
|
const TTyChars& AR_CCharsWrapStart,
|
||||||
TypeLength AL_StartPos=0
|
const TTyChars& AR_CCharsWrapClose,
|
||||||
/*//////////*/ ) ///////////////////////////////////////////////*/
|
TypeLength AL_StartPos=0
|
||||||
|
)
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
{
|
{
|
||||||
return ZtCMainChars::FindPosEscWrap(
|
return ZtCMainChars::FindPosEscWrap
|
||||||
AR_CCharsOrigin.data(), AR_CCharsSearch.data(), AR_CCharsEscape.data(), AR_CCharsWrapStart.data(), AR_CCharsWrapClose.data(),
|
(
|
||||||
AR_CCharsOrigin.size(), AR_CCharsSearch.size(), AR_CCharsEscape.size(), AR_CCharsWrapStart.size(), AR_CCharsWrapClose.size(), AL_StartPos
|
AR_CCharsOrigin.data(), AR_CCharsSearch.data(), AR_CCharsEscape.data(), AR_CCharsWrapStart.data(), AR_CCharsWrapClose.data(),
|
||||||
/*/////////*/ );
|
AR_CCharsOrigin.size(), AR_CCharsSearch.size(), AR_CCharsEscape.size(), AR_CCharsWrapStart.size(), AR_CCharsWrapClose.size(), AL_StartPos
|
||||||
}/*
|
);
|
||||||
template<typename TTyChars> static TypeLength FindPosEscWrap( //////
|
/*********************************/
|
||||||
const TTyChars& AR_CCharsOrigin ,
|
}
|
||||||
const TTyChars& AR_CCharsSearch ,
|
|
||||||
const TTyChars& AR_CCharsEscape ,
|
|
||||||
const TTyChars& AR_CCharsWrapStart,
|
|
||||||
const TTyChars& AR_CCharsWrapClose,
|
|
||||||
TypeLength AL_StartPos=0
|
|
||||||
////////////// ) ///////////////////////////////////////////////*/
|
|
||||||
|
|
||||||
|
|
||||||
/*////////////////////////////////////////////////////////////////
|
/*////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
■ FindPosEscWrap() 테스트.
|
■ FindPosEscWrap() 테스트.
|
||||||
|
Reference in New Issue
Block a user