From d21d5b02636f59786ebf08c58fe777a55d0fb85a Mon Sep 17 00:00:00 2001 From: sauron Date: Sat, 18 Oct 2025 11:37:18 +0900 Subject: [PATCH] commit 2025-10-18 11:37 edit a bit ZCppMain/ZtCMainChars.H --- ZCppMain/ZtCMainChars.H | 165 ++++++++++++++++++++++++++---------------------- 1 file changed, 88 insertions(+), 77 deletions(-) diff --git a/ZCppMain/ZtCMainChars.H b/ZCppMain/ZtCMainChars.H index de666ab..29a9cb1 100644 --- a/ZCppMain/ZtCMainChars.H +++ b/ZCppMain/ZtCMainChars.H @@ -291,8 +291,8 @@ namespace ZNsMain static int Minus /*#################################################*/ ( - const TypeChar* APC_Left , const TypeChar* APC_Right, - TypeLength AL_LeftLength, TypeLength AL_RightLength + TypeCharC* APC_Left , TypeCharC* APC_Right, + TypeLength AL_LeftLength, TypeLength AL_RightLength ) /*##################################################################*/ { @@ -350,8 +350,8 @@ namespace ZNsMain }/* static int Minus #@################################################### ( - const TypeChar* APC_Left , const TypeChar* APC_Right, - TypeLength AL_LeftLength, TypeLength AL_RightLength + TypeCharC* APC_Left , TypeCharC* APC_Right, + TypeLength AL_LeftLength, TypeLength AL_RightLength ) ####################################################################*/ @@ -547,8 +547,12 @@ namespace ZNsMain }/* template static bool DoClose(const TTyChars& AR_CCharsOrigin, const TTyChars& AR_CCharsSearch) */ - static bool DoClose( - TypeCharC* APC_Origin, TypeCharC* APC_Search, TypeLength AL_OriginLength, TypeLength AL_SearchLength) + static bool DoClose /*//////////////////////////////////////*/ + ( + TypeCharC* APC_Origin , TypeCharC* APC_Search, + TypeLength AL_OriginLength, TypeLength AL_SearchLength + ) + /*##########################################################*/ { const bool CB_IsBad = /*:::::::::::::::*/ ( @@ -569,8 +573,12 @@ namespace ZNsMain return true; }/* - static bool DoClose( - TypeCharC* APC_Origin, TypeCharC* APC_Search, TypeLength AL_OriginLength, TypeLength AL_SearchLength)*/ + static bool DoClose ////////////////////////////////////////// + ( + TypeCharC* APC_Origin , TypeCharC* APC_Search, + TypeLength AL_OriginLength, TypeLength AL_SearchLength + ) + ############################################################*/ template static bool DoEndLinear( @@ -816,15 +824,17 @@ namespace ZNsMain //////////// ) ////////////////////////////////////////////////*/ - static TypeLength FindPosEsc( //////////////////////////////////// - TypeCharC* APC_Origin , - TypeCharC* APC_Search , - TypeCharC* APC_Escape , - TypeLength AL_OriginLen , - TypeLength AL_SearchLen , - TypeLength AL_EscapeLen , - TypeLength AL_StartPos=0 - /*//////////*/ ) ///////////////////////////////////////////////// + static TypeLength FindPosEsc ///////////////////////////////////// + ( + TypeCharC* APC_Origin , + TypeCharC* APC_Search , + TypeCharC* APC_Escape , + TypeLength AL_OriginLen , + TypeLength AL_SearchLen , + TypeLength AL_EscapeLen , + TypeLength AL_StartPos=0 + ) + ////////////////////////////////////////////////////////////////// { if(AL_EscapeLen<1) return ZtCMainChars::FindPos ( @@ -841,7 +851,7 @@ namespace ZNsMain if(CB_IsBad) return -1; - const TypeChar* VP_Origin = APC_Origin+AL_StartPos ; + TypeCharC* VP_Origin = APC_Origin+AL_StartPos ; bool VB_DoEscape= false ; TypeLength i = 0 ; TypeLength VL_MaxLoop = @@ -894,15 +904,17 @@ namespace ZNsMain return -1; }/* - static TypeLength FindPosEsc( //////////////////////////////////// - TypeCharC* APC_Origin , - TypeCharC* APC_Search , - TypeCharC* APC_Escape , - TypeLength AL_OriginLen , - TypeLength AL_SearchLen , - TypeLength AL_EscapeLen , - TypeLength AL_StartPos=0 - ////////////// ) ///////////////////////////////////////////////*/ + static TypeLength FindPosEsc ///////////////////////////////////// + ( + TypeCharC* APC_Origin , + TypeCharC* APC_Search , + TypeCharC* APC_Escape , + TypeLength AL_OriginLen , + TypeLength AL_SearchLen , + TypeLength AL_EscapeLen , + TypeLength AL_StartPos=0 + ) + ////////////////////////////////////////////////////////////////*/ template static TypeLength FindPosEsc( @@ -919,19 +931,21 @@ namespace ZNsMain /* APC_Search 문자열을 찾는데 APC_WrapStart 로 시작한다면 APC_WrapClose 을 찾고 바로 다음에 APC_Search 이 있어야 그 위치를 반환한다. */ - static TypeLength FindPosEscWrap( //////////////////////////////// - TypeCharC* APC_Origin , - TypeCharC* APC_Search , - TypeCharC* APC_Escape , - TypeCharC* APC_WrapStart , - TypeCharC* APC_WrapClose , - TypeLength AL_OriginLen , - TypeLength AL_SearchLen , - TypeLength AL_EscapeLen , - TypeLength AL_WrapStartLen , - TypeLength AL_WrapCloseLen , - TypeLength AL_StartPos=0 - /*//////////*/ ) ///////////////////////////////////////////////*/ + static TypeLength FindPosEscWrap ///////////////////////////////// + ( + TypeCharC* APC_Origin , + TypeCharC* APC_Search , + TypeCharC* APC_Escape , + TypeCharC* APC_WrapStart , + TypeCharC* APC_WrapClose , + TypeLength AL_OriginLen , + TypeLength AL_SearchLen , + TypeLength AL_EscapeLen , + TypeLength AL_WrapStartLen , + TypeLength AL_WrapCloseLen , + TypeLength AL_StartPos=0 + ) + ////////////////////////////////////////////////////////////////// { const bool CB_IsBad = /////////////////////// ( @@ -984,46 +998,43 @@ namespace ZNsMain }/* 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( //////////////////////////////// - TypeCharC* APC_Origin , - TypeCharC* APC_Search , - TypeCharC* APC_Escape , - TypeCharC* APC_WrapStart , - TypeCharC* APC_WrapClose , - TypeLength AL_OriginLen , - TypeLength AL_SearchLen , - TypeLength AL_EscapeLen , - TypeLength AL_WrapStartLen , - TypeLength AL_WrapCloseLen , - TypeLength AL_StartPos=0 - ////////////// ) ///////////////////////////////////////////////*/ + static TypeLength FindPosEscWrap ///////////////////////////////// + ( + TypeCharC* APC_Origin , + TypeCharC* APC_Search , + TypeCharC* APC_Escape , + TypeCharC* APC_WrapStart , + TypeCharC* APC_WrapClose , + TypeLength AL_OriginLen , + TypeLength AL_SearchLen , + TypeLength AL_EscapeLen , + TypeLength AL_WrapStartLen , + TypeLength AL_WrapCloseLen , + TypeLength AL_StartPos=0 + ) + ////////////////////////////////////////////////////////////////*/ - template 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 - /*//////////*/ ) ///////////////////////////////////////////////*/ + template 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 + ) + ////////////////////////////////////////////////////////////////// { - 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 - /*/////////*/ ); - }/* - template 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 - ////////////// ) ///////////////////////////////////////////////*/ - - + 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 + ); + /*********************************/ + } /*//////////////////////////////////////////////////////////////// ■ FindPosEscWrap() 테스트.