Fixed StrFunc parameter order.
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7100 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
a46a79cb46
commit
21c7679ed6
3 changed files with 67 additions and 144 deletions
|
@ -32,6 +32,29 @@ ${UnStrTok}
|
||||||
${UnStrTrimNewLines}
|
${UnStrTrimNewLines}
|
||||||
${UnStrSort}
|
${UnStrSort}
|
||||||
|
|
||||||
|
|
||||||
|
Var SFPass
|
||||||
|
Var SFTotl
|
||||||
|
!macro EndStrFuncTestEx lbl name
|
||||||
|
IfErrors ${lbl}
|
||||||
|
DetailPrint "PASSED ${name} test"
|
||||||
|
IntOp $SFPass $SFPass + 1
|
||||||
|
IntOp $SFTotl $SFTotl + 1
|
||||||
|
Goto +3
|
||||||
|
${lbl}:
|
||||||
|
DetailPrint "FAILED ${name} test"
|
||||||
|
IntOp $SFTotl $SFTotl + 1
|
||||||
|
!macroend
|
||||||
|
!macro EndStrFuncTest name
|
||||||
|
!insertmacro EndStrFuncTestEx "${name}error" "${name}"
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
CompletedText "Passed $SFPass of $SFTotl tests"
|
||||||
|
!macro CompletedAllTests
|
||||||
|
StrCmp $SFPass $SFTotl +2
|
||||||
|
SetErrorLevel 42
|
||||||
|
!macroend
|
||||||
|
|
||||||
!macro StackVerificationStart
|
!macro StackVerificationStart
|
||||||
StrCpy $0 S0
|
StrCpy $0 S0
|
||||||
StrCpy $1 S1
|
StrCpy $1 S1
|
||||||
|
@ -103,16 +126,13 @@ Section
|
||||||
${StrCase} $0 "what about taking a shower tomorrow? it's late to do so now! try to sleep now. Good Night!" "S"
|
${StrCase} $0 "what about taking a shower tomorrow? it's late to do so now! try to sleep now. Good Night!" "S"
|
||||||
StrCmp $0 "What about taking a shower tomorrow? It's late to do so now! Try to sleep now. Good night!" 0 strcaseerror
|
StrCmp $0 "What about taking a shower tomorrow? It's late to do so now! Try to sleep now. Good night!" 0 strcaseerror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strcaseerror
|
!insertmacro EndStrFuncTest StrCase
|
||||||
|
|
||||||
DetailPrint "PASSED StrCase test"
|
|
||||||
Goto +2
|
|
||||||
strcaseerror:
|
|
||||||
DetailPrint "FAILED StrCase test"
|
|
||||||
|
|
||||||
# Test clipboard function
|
# Test clipboard function
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
|
!verbose push 4
|
||||||
${StrClb} $0 "StrFunc clipboard test" ">"
|
${StrClb} $0 "StrFunc clipboard test" ">"
|
||||||
|
!verbose pop
|
||||||
StrCmp $0 "" 0 strclberror
|
StrCmp $0 "" 0 strclberror
|
||||||
${StrClb} $0 "StrFunc clipboard test #2" "<>"
|
${StrClb} $0 "StrFunc clipboard test #2" "<>"
|
||||||
StrCmp $0 "StrFunc clipboard test" 0 strclberror
|
StrCmp $0 "StrFunc clipboard test" 0 strclberror
|
||||||
|
@ -121,12 +141,7 @@ strcaseerror:
|
||||||
${StrClb} $0 "" ""
|
${StrClb} $0 "" ""
|
||||||
StrCmp $0 "" 0 strclberror
|
StrCmp $0 "" 0 strclberror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strclberror
|
!insertmacro EndStrFuncTest StrClb
|
||||||
|
|
||||||
DetailPrint "PASSED StrClb test"
|
|
||||||
Goto +2
|
|
||||||
strclberror:
|
|
||||||
DetailPrint "FAILED StrClb test"
|
|
||||||
|
|
||||||
# Test IO functions
|
# Test IO functions
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
|
@ -144,13 +159,8 @@ strclberror:
|
||||||
!insertmacro testio ""
|
!insertmacro testio ""
|
||||||
!insertmacro testio " "
|
!insertmacro testio " "
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors ioerror
|
!insertmacro EndStrFuncTestEx ioerror "StrNSISToIO/StrIOToNSIS"
|
||||||
|
|
||||||
DetailPrint "PASSED StrNSISToIO/StrIOToNSIS test"
|
|
||||||
Goto +2
|
|
||||||
ioerror:
|
|
||||||
DetailPrint "FAILED StrNSISToIO/StrIOToNSIS test"
|
|
||||||
|
|
||||||
# Test string search functions
|
# Test string search functions
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
${StrLoc} $0 "This is just an example" "just" "<"
|
${StrLoc} $0 "This is just an example" "just" "<"
|
||||||
|
@ -174,12 +184,7 @@ ioerror:
|
||||||
${StrLoc} $0 abc d <
|
${StrLoc} $0 abc d <
|
||||||
StrCmp $0 "" 0 strlocerror
|
StrCmp $0 "" 0 strlocerror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strlocerror
|
!insertmacro EndStrFuncTest StrLoc
|
||||||
|
|
||||||
DetailPrint "PASSED StrLoc test"
|
|
||||||
Goto +2
|
|
||||||
strlocerror:
|
|
||||||
DetailPrint "FAILED StrLoc test"
|
|
||||||
|
|
||||||
# Test string replacement
|
# Test string replacement
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
|
@ -198,12 +203,7 @@ strlocerror:
|
||||||
${StrRep} $0 "test" "" ""
|
${StrRep} $0 "test" "" ""
|
||||||
StrCmp $0 "test" 0 strreperror
|
StrCmp $0 "test" 0 strreperror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strreperror
|
!insertmacro EndStrFuncTest StrRep
|
||||||
|
|
||||||
DetailPrint "PASSED StrRep test"
|
|
||||||
Goto +2
|
|
||||||
strreperror:
|
|
||||||
DetailPrint "FAILED StrRep test"
|
|
||||||
|
|
||||||
# Test sorting
|
# Test sorting
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
|
@ -246,12 +246,7 @@ strreperror:
|
||||||
${StrSort} $0 "" " " "something" " " "1" "0" "1"
|
${StrSort} $0 "" " " "something" " " "1" "0" "1"
|
||||||
StrCmp $0 "" 0 strsorterror
|
StrCmp $0 "" 0 strsorterror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strsorterror
|
!insertmacro EndStrFuncTest StrSort
|
||||||
|
|
||||||
DetailPrint "PASSED StrSort test"
|
|
||||||
Goto +2
|
|
||||||
strsorterror:
|
|
||||||
DetailPrint "FAILED StrSort test"
|
|
||||||
|
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
${StrStr} $0 "abcefghijklmnopqrstuvwxyz" "g"
|
${StrStr} $0 "abcefghijklmnopqrstuvwxyz" "g"
|
||||||
|
@ -263,12 +258,7 @@ strsorterror:
|
||||||
${StrStr} $0 "a" "abcefghijklmnopqrstuvwxyz"
|
${StrStr} $0 "a" "abcefghijklmnopqrstuvwxyz"
|
||||||
StrCmp $0 "" 0 strstrerror
|
StrCmp $0 "" 0 strstrerror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strstrerror
|
!insertmacro EndStrFuncTest StrStr
|
||||||
|
|
||||||
DetailPrint "PASSED StrStr test"
|
|
||||||
Goto +2
|
|
||||||
strstrerror:
|
|
||||||
DetailPrint "FAILED StrStr test"
|
|
||||||
|
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
${StrStrAdv} $0 "abcabcabc" "a" ">" ">" "1" "0" "0"
|
${StrStrAdv} $0 "abcabcabc" "a" ">" ">" "1" "0" "0"
|
||||||
|
@ -312,12 +302,7 @@ strstrerror:
|
||||||
${StrStrAdv} $0 "ABCabcabc" "abc" "<" ">" "0" "1" "1"
|
${StrStrAdv} $0 "ABCabcabc" "abc" "<" ">" "0" "1" "1"
|
||||||
StrCmp $0 "abc" 0 strstradverror
|
StrCmp $0 "abc" 0 strstradverror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strstradverror
|
!insertmacro EndStrFuncTest StrStrAdv
|
||||||
|
|
||||||
DetailPrint "PASSED StrStrAdv test"
|
|
||||||
Goto +2
|
|
||||||
strstradverror:
|
|
||||||
DetailPrint "FAILED StrStrAdv test"
|
|
||||||
|
|
||||||
# Test tokenizer
|
# Test tokenizer
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
|
@ -334,29 +319,20 @@ strstradverror:
|
||||||
${StrTok} $0 "This is, or is not, just an example" " ," "0" "0"
|
${StrTok} $0 "This is, or is not, just an example" " ," "0" "0"
|
||||||
StrCmp $0 "This" 0 strtokerror
|
StrCmp $0 "This" 0 strtokerror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strtokerror
|
!insertmacro EndStrFuncTest StrTok
|
||||||
|
|
||||||
DetailPrint "PASSED StrTok test"
|
|
||||||
Goto +2
|
|
||||||
strtokerror:
|
|
||||||
DetailPrint "FAILED StrTok test"
|
|
||||||
|
|
||||||
# Test trim new lines
|
# Test trim new lines
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
${StrTrimNewLines} $0 "$\r$\ntest$\r$\ntest$\r$\n"
|
${StrTrimNewLines} $0 "$\r$\ntest$\r$\ntest$\r$\n"
|
||||||
StrCmp $0 "$\r$\ntest$\r$\ntest" 0 strtrimnewlineserror
|
StrCmp $0 "$\r$\ntest$\r$\ntest" 0 strtrimnewlineserror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strtrimnewlineserror
|
!insertmacro EndStrFuncTest StrTrimNewlines
|
||||||
|
|
||||||
DetailPrint "PASSED StrTrimNewLines test"
|
InitPluginsDir
|
||||||
Goto +2
|
WriteUninstaller $PluginsDir\UnStrFunc.exe
|
||||||
strtrimnewlineserror:
|
ExecWait '"$PluginsDir\UnStrFunc.exe" _?=$PluginsDir'
|
||||||
DetailPrint "FAILED StrTrimNewLines test"
|
|
||||||
|
|
||||||
WriteUninstaller $EXEDIR\UnStrFunc.exe
|
|
||||||
|
|
||||||
Exec $EXEDIR\UnStrFunc.exe
|
|
||||||
|
|
||||||
|
!insertmacro CompletedAllTests
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section Uninstall
|
Section Uninstall
|
||||||
|
@ -382,12 +358,7 @@ Section Uninstall
|
||||||
${UnStrCase} $0 "what about taking a shower tomorrow? it's late to do so now! try to sleep now. Good Night!" "S"
|
${UnStrCase} $0 "what about taking a shower tomorrow? it's late to do so now! try to sleep now. Good Night!" "S"
|
||||||
StrCmp $0 "What about taking a shower tomorrow? It's late to do so now! Try to sleep now. Good night!" 0 strcaseerror
|
StrCmp $0 "What about taking a shower tomorrow? It's late to do so now! Try to sleep now. Good night!" 0 strcaseerror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strcaseerror
|
!insertmacro EndStrFuncTest StrCase
|
||||||
|
|
||||||
DetailPrint "PASSED StrCase test"
|
|
||||||
Goto +2
|
|
||||||
strcaseerror:
|
|
||||||
DetailPrint "FAILED StrCase test"
|
|
||||||
|
|
||||||
# Test clipboard function
|
# Test clipboard function
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
|
@ -400,12 +371,7 @@ strcaseerror:
|
||||||
${UnStrClb} $0 "" ""
|
${UnStrClb} $0 "" ""
|
||||||
StrCmp $0 "" 0 strclberror
|
StrCmp $0 "" 0 strclberror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strclberror
|
!insertmacro EndStrFuncTest StrClb
|
||||||
|
|
||||||
DetailPrint "PASSED StrClb test"
|
|
||||||
Goto +2
|
|
||||||
strclberror:
|
|
||||||
DetailPrint "FAILED StrClb test"
|
|
||||||
|
|
||||||
# Test IO functions
|
# Test IO functions
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
|
@ -423,12 +389,7 @@ strclberror:
|
||||||
!insertmacro untestio ""
|
!insertmacro untestio ""
|
||||||
!insertmacro untestio " "
|
!insertmacro untestio " "
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors ioerror
|
!insertmacro EndStrFuncTestEx ioerror "StrNSISToIO/StrIOToNSIS"
|
||||||
|
|
||||||
DetailPrint "PASSED StrNSISToIO/StrIOToNSIS test"
|
|
||||||
Goto +2
|
|
||||||
ioerror:
|
|
||||||
DetailPrint "FAILED StrNSISToIO/StrIOToNSIS test"
|
|
||||||
|
|
||||||
# Test string search functions
|
# Test string search functions
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
|
@ -453,12 +414,7 @@ ioerror:
|
||||||
${UnStrLoc} $0 abc d <
|
${UnStrLoc} $0 abc d <
|
||||||
StrCmp $0 "" 0 strlocerror
|
StrCmp $0 "" 0 strlocerror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strlocerror
|
!insertmacro EndStrFuncTest StrLoc
|
||||||
|
|
||||||
DetailPrint "PASSED StrLoc test"
|
|
||||||
Goto +2
|
|
||||||
strlocerror:
|
|
||||||
DetailPrint "FAILED StrLoc test"
|
|
||||||
|
|
||||||
# Test string replacement
|
# Test string replacement
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
|
@ -477,12 +433,7 @@ strlocerror:
|
||||||
${UnStrRep} $0 "test" "" ""
|
${UnStrRep} $0 "test" "" ""
|
||||||
StrCmp $0 "test" 0 strreperror
|
StrCmp $0 "test" 0 strreperror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strreperror
|
!insertmacro EndStrFuncTest StrRep
|
||||||
|
|
||||||
DetailPrint "PASSED StrRep test"
|
|
||||||
Goto +2
|
|
||||||
strreperror:
|
|
||||||
DetailPrint "FAILED StrRep test"
|
|
||||||
|
|
||||||
# Test sorting
|
# Test sorting
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
|
@ -525,12 +476,7 @@ strreperror:
|
||||||
${UnStrSort} $0 "" " " "something" " " "1" "0" "1"
|
${UnStrSort} $0 "" " " "something" " " "1" "0" "1"
|
||||||
StrCmp $0 "" 0 strsorterror
|
StrCmp $0 "" 0 strsorterror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strsorterror
|
!insertmacro EndStrFuncTest StrSort
|
||||||
|
|
||||||
DetailPrint "PASSED StrSort test"
|
|
||||||
Goto +2
|
|
||||||
strsorterror:
|
|
||||||
DetailPrint "FAILED StrSort test"
|
|
||||||
|
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
${UnStrStr} $0 "abcefghijklmnopqrstuvwxyz" "g"
|
${UnStrStr} $0 "abcefghijklmnopqrstuvwxyz" "g"
|
||||||
|
@ -542,12 +488,7 @@ strsorterror:
|
||||||
${UnStrStr} $0 "a" "abcefghijklmnopqrstuvwxyz"
|
${UnStrStr} $0 "a" "abcefghijklmnopqrstuvwxyz"
|
||||||
StrCmp $0 "" 0 strstrerror
|
StrCmp $0 "" 0 strstrerror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strstrerror
|
!insertmacro EndStrFuncTest StrStr
|
||||||
|
|
||||||
DetailPrint "PASSED StrStr test"
|
|
||||||
Goto +2
|
|
||||||
strstrerror:
|
|
||||||
DetailPrint "FAILED StrStr test"
|
|
||||||
|
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
${UnStrStrAdv} $0 "abcabcabc" "a" ">" ">" "1" "0" "0"
|
${UnStrStrAdv} $0 "abcabcabc" "a" ">" ">" "1" "0" "0"
|
||||||
|
@ -591,12 +532,7 @@ strstrerror:
|
||||||
${UnStrStrAdv} $0 "ABCabcabc" "abc" "<" ">" "0" "1" "1"
|
${UnStrStrAdv} $0 "ABCabcabc" "abc" "<" ">" "0" "1" "1"
|
||||||
StrCmp $0 "abc" 0 strstradverror
|
StrCmp $0 "abc" 0 strstradverror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strstradverror
|
!insertmacro EndStrFuncTest StrStrAdv
|
||||||
|
|
||||||
DetailPrint "PASSED StrStrAdv test"
|
|
||||||
Goto +2
|
|
||||||
strstradverror:
|
|
||||||
DetailPrint "FAILED StrStrAdv test"
|
|
||||||
|
|
||||||
# Test tokenizer
|
# Test tokenizer
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
|
@ -613,23 +549,14 @@ strstradverror:
|
||||||
${UnStrTok} $0 "This is, or is not, just an example" " ," "0" "0"
|
${UnStrTok} $0 "This is, or is not, just an example" " ," "0" "0"
|
||||||
StrCmp $0 "This" 0 strtokerror
|
StrCmp $0 "This" 0 strtokerror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strtokerror
|
!insertmacro EndStrFuncTest StrTok
|
||||||
|
|
||||||
DetailPrint "PASSED StrTok test"
|
|
||||||
Goto +2
|
|
||||||
strtokerror:
|
|
||||||
DetailPrint "FAILED StrTok test"
|
|
||||||
|
|
||||||
# Test trim new lines
|
# Test trim new lines
|
||||||
!insertmacro StackVerificationStart
|
!insertmacro StackVerificationStart
|
||||||
${UnStrTrimNewLines} $0 "$\r$\ntest$\r$\ntest$\r$\n"
|
${UnStrTrimNewLines} $0 "$\r$\ntest$\r$\ntest$\r$\n"
|
||||||
StrCmp $0 "$\r$\ntest$\r$\ntest" 0 strtrimnewlineserror
|
StrCmp $0 "$\r$\ntest$\r$\ntest" 0 strtrimnewlineserror
|
||||||
!insertmacro StackVerificationEnd
|
!insertmacro StackVerificationEnd
|
||||||
IfErrors strtrimnewlineserror
|
!insertmacro EndStrFuncTest StrTrimNewLines
|
||||||
|
|
||||||
DetailPrint "PASSED StrTrimNewLines test"
|
|
||||||
Goto +2
|
|
||||||
strtrimnewlineserror:
|
|
||||||
DetailPrint "FAILED StrTrimNewLines test"
|
|
||||||
|
|
||||||
|
!insertmacro CompletedAllTests
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
|
@ -321,12 +321,12 @@ o-----------------------------------------------------------------------------o
|
||||||
# StrClb
|
# StrClb
|
||||||
!insertmacro STRFUNC_DEFFUNC StrClb `ResultVar|String|Action` `Output|Text|Option > < <>`
|
!insertmacro STRFUNC_DEFFUNC StrClb `ResultVar|String|Action` `Output|Text|Option > < <>`
|
||||||
|
|
||||||
!macro STRFUNC_CALL_StrClb un ResultVar String Type
|
!macro STRFUNC_CALL_StrClb un ResultVar String Action
|
||||||
!verbose push ${STRFUNC_VERBOSITY}
|
!verbose push ${STRFUNC_VERBOSITY}
|
||||||
!echo `${U+24}{${un}StrClb} "${ResultVar}" "${String}" "${Action}"`
|
!echo `${U+24}{${un}StrClb} "${ResultVar}" "${String}" "${Action}"`
|
||||||
!verbose 2
|
!verbose 2
|
||||||
Push `${String}`
|
Push `${String}`
|
||||||
Push `${Type}`
|
Push `${Action}`
|
||||||
!insertmacro STRFUNC_CALL StrClb "${un}"
|
!insertmacro STRFUNC_CALL StrClb "${un}"
|
||||||
Pop ${ResultVar}
|
Pop ${ResultVar}
|
||||||
!verbose pop
|
!verbose pop
|
||||||
|
@ -458,12 +458,11 @@ o-----------------------------------------------------------------------------o
|
||||||
# StrIOToNSIS
|
# StrIOToNSIS
|
||||||
!insertmacro STRFUNC_DEFFUNC StrIOToNSIS `ResultVar|String` `Output|Text`
|
!insertmacro STRFUNC_DEFFUNC StrIOToNSIS `ResultVar|String` `Output|Text`
|
||||||
|
|
||||||
!macro STRFUNC_CALL_StrIOToNSIS un ResultVar String Type
|
!macro STRFUNC_CALL_StrIOToNSIS un ResultVar String
|
||||||
!verbose push ${STRFUNC_VERBOSITY}
|
!verbose push ${STRFUNC_VERBOSITY}
|
||||||
!echo `${U+24}{${un}StrIOToNSIS} "${ResultVar}" "${String}"`
|
!echo `${U+24}{${un}StrIOToNSIS} "${ResultVar}" "${String}"`
|
||||||
!verbose 2
|
!verbose 2
|
||||||
Push `${String}`
|
Push `${String}`
|
||||||
Push `${Type}`
|
|
||||||
!insertmacro STRFUNC_CALL StrIOToNSIS "${un}"
|
!insertmacro STRFUNC_CALL StrIOToNSIS "${un}"
|
||||||
Pop ${ResultVar}
|
Pop ${ResultVar}
|
||||||
!verbose pop
|
!verbose pop
|
||||||
|
@ -531,7 +530,7 @@ o-----------------------------------------------------------------------------o
|
||||||
# StrLoc
|
# StrLoc
|
||||||
!insertmacro STRFUNC_DEFFUNC StrLoc `ResultVar|String|StrToSearchFor|CounterDirection` `Output|Text|Text|Option > <`
|
!insertmacro STRFUNC_DEFFUNC StrLoc `ResultVar|String|StrToSearchFor|CounterDirection` `Output|Text|Text|Option > <`
|
||||||
|
|
||||||
!macro STRFUNC_CALL_StrLoc un ResultVar String Type
|
!macro STRFUNC_CALL_StrLoc un ResultVar String StrToSearchFor OffsetDirection
|
||||||
!verbose push ${STRFUNC_VERBOSITY}
|
!verbose push ${STRFUNC_VERBOSITY}
|
||||||
!echo `${U+24}{${un}StrLoc} "${ResultVar}" "${String}" "${StrToSearchFor}" "${OffsetDirection}"`
|
!echo `${U+24}{${un}StrLoc} "${ResultVar}" "${String}" "${StrToSearchFor}" "${OffsetDirection}"`
|
||||||
!verbose 2
|
!verbose 2
|
||||||
|
@ -614,7 +613,7 @@ o-----------------------------------------------------------------------------o
|
||||||
# StrNSISToIO
|
# StrNSISToIO
|
||||||
!insertmacro STRFUNC_DEFFUNC StrNSISToIO `ResultVar|String` `Output|Text`
|
!insertmacro STRFUNC_DEFFUNC StrNSISToIO `ResultVar|String` `Output|Text`
|
||||||
|
|
||||||
!macro STRFUNC_CALL_StrNSISToIO un ResultVar String Type
|
!macro STRFUNC_CALL_StrNSISToIO un ResultVar String
|
||||||
!verbose push ${STRFUNC_VERBOSITY}
|
!verbose push ${STRFUNC_VERBOSITY}
|
||||||
!echo `${U+24}{${un}StrNSISToIO} "${ResultVar}" "${String}"`
|
!echo `${U+24}{${un}StrNSISToIO} "${ResultVar}" "${String}"`
|
||||||
!verbose 2
|
!verbose 2
|
||||||
|
@ -687,7 +686,7 @@ o-----------------------------------------------------------------------------o
|
||||||
# StrRep
|
# StrRep
|
||||||
!insertmacro STRFUNC_DEFFUNC StrRep `ResultVar|String|StrToReplace|ReplacementString` `Output|Text|Text|Text`
|
!insertmacro STRFUNC_DEFFUNC StrRep `ResultVar|String|StrToReplace|ReplacementString` `Output|Text|Text|Text`
|
||||||
|
|
||||||
!macro STRFUNC_CALL_StrRep un ResultVar String Type
|
!macro STRFUNC_CALL_StrRep un ResultVar String StringToReplace ReplacementString
|
||||||
!verbose push ${STRFUNC_VERBOSITY}
|
!verbose push ${STRFUNC_VERBOSITY}
|
||||||
!echo `${U+24}{${un}StrRep} "${ResultVar}" "${String}" "${StringToReplace}" "${ReplacementString}"`
|
!echo `${U+24}{${un}StrRep} "${ResultVar}" "${String}" "${StringToReplace}" "${ReplacementString}"`
|
||||||
!verbose 2
|
!verbose 2
|
||||||
|
@ -790,9 +789,9 @@ o-----------------------------------------------------------------------------o
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
# StrSort
|
# StrSort
|
||||||
!insertmacro STRFUNC_DEFFUNC StrSort `ResultVar|String|LeftStr|CenterStr|RightStr|IncludeLeftStr|IncludeCenterStr|IncludeRightStr` `Output|Text|Text|Text|Text|Option 1 0|Option 1 0|Option 1 0`
|
!insertmacro STRFUNC_DEFFUNC StrSort `ResultVar|String|CenterStr|LeftStr|RightStr|IncludeLeftStr|IncludeCenterStr|IncludeRightStr` `Output|Text|Text|Text|Text|Option 1 0|Option 1 0|Option 1 0`
|
||||||
|
|
||||||
!macro STRFUNC_CALL_StrSort un ResultVar String Type
|
!macro STRFUNC_CALL_StrSort un ResultVar String CenterStr LeftStr RightStr IncludeCenterStr IncludeLeftStr IncludeRightStr
|
||||||
!verbose push ${STRFUNC_VERBOSITY}
|
!verbose push ${STRFUNC_VERBOSITY}
|
||||||
!echo `${U+24}{${un}StrSort} "${ResultVar}" "${String}" "${CenterStr}" "${LeftStr}" "${RightStr}" "${IncludeCenterStr}" "${IncludeLeftStr}" "${IncludeRightStr}"`
|
!echo `${U+24}{${un}StrSort} "${ResultVar}" "${String}" "${CenterStr}" "${LeftStr}" "${RightStr}" "${IncludeCenterStr}" "${IncludeLeftStr}" "${IncludeRightStr}"`
|
||||||
!verbose 2
|
!verbose 2
|
||||||
|
@ -1016,7 +1015,7 @@ o-----------------------------------------------------------------------------o
|
||||||
# StrStr
|
# StrStr
|
||||||
!insertmacro STRFUNC_DEFFUNC StrStr `ResultVar|String|StrToSearchFor` `Output|Text|Text`
|
!insertmacro STRFUNC_DEFFUNC StrStr `ResultVar|String|StrToSearchFor` `Output|Text|Text`
|
||||||
|
|
||||||
!macro STRFUNC_CALL_StrStr un ResultVar String Type
|
!macro STRFUNC_CALL_StrStr un ResultVar String StrToSearchFor
|
||||||
!verbose push ${STRFUNC_VERBOSITY}
|
!verbose push ${STRFUNC_VERBOSITY}
|
||||||
!echo `${U+24}{${un}StrStr} "${ResultVar}" "${String}" "${StrToSearchFor}"`
|
!echo `${U+24}{${un}StrStr} "${ResultVar}" "${String}" "${StrToSearchFor}"`
|
||||||
!verbose 2
|
!verbose 2
|
||||||
|
@ -1089,7 +1088,7 @@ o-----------------------------------------------------------------------------o
|
||||||
# StrStrAdv
|
# StrStrAdv
|
||||||
!insertmacro STRFUNC_DEFFUNC StrStrAdv `ResultVar|String|StrToSearchFor|SearchDirection|ResultStrDirection|DisplayStrToSearch|Loops|CaseSensitive` `Output|Text|Text|Option > <|Option > <|Option 1 0|Text|Option 0 1`
|
!insertmacro STRFUNC_DEFFUNC StrStrAdv `ResultVar|String|StrToSearchFor|SearchDirection|ResultStrDirection|DisplayStrToSearch|Loops|CaseSensitive` `Output|Text|Text|Option > <|Option > <|Option 1 0|Text|Option 0 1`
|
||||||
|
|
||||||
!macro STRFUNC_CALL_StrStrAdv un ResultVar String Type
|
!macro STRFUNC_CALL_StrStrAdv un ResultVar String StrToSearchFor SearchDirection ResultStrDirection DisplayStrToSearch Loops CaseSensitive
|
||||||
!verbose push ${STRFUNC_VERBOSITY}
|
!verbose push ${STRFUNC_VERBOSITY}
|
||||||
!echo `${U+24}{${un}StrStrAdv} "${ResultVar}" "${String}" "${StrToSearchFor}" "${SearchDirection}" "${ResultStrDirection}" "${DisplayStrToSearch}" "${Loops}" "${CaseSensitive}"`
|
!echo `${U+24}{${un}StrStrAdv} "${ResultVar}" "${String}" "${StrToSearchFor}" "${SearchDirection}" "${ResultStrDirection}" "${DisplayStrToSearch}" "${Loops}" "${CaseSensitive}"`
|
||||||
!verbose 2
|
!verbose 2
|
||||||
|
@ -1369,7 +1368,7 @@ o-----------------------------------------------------------------------------o
|
||||||
# StrTok
|
# StrTok
|
||||||
!insertmacro STRFUNC_DEFFUNC StrTok `ResultVar|String|Separators|ResultPart|SkipEmptyParts` `Output|Text|Text|Mixed L|Option 1 0`
|
!insertmacro STRFUNC_DEFFUNC StrTok `ResultVar|String|Separators|ResultPart|SkipEmptyParts` `Output|Text|Text|Mixed L|Option 1 0`
|
||||||
|
|
||||||
!macro STRFUNC_CALL_StrTok un ResultVar String Type
|
!macro STRFUNC_CALL_StrTok un ResultVar String Separators ResultPart SkipEmptyParts
|
||||||
!verbose push ${STRFUNC_VERBOSITY}
|
!verbose push ${STRFUNC_VERBOSITY}
|
||||||
!echo `${U+24}{${un}StrTok} "${ResultVar}" "${String}" "${Separators}" "${ResultPart}" "${SkipEmptyParts}"`
|
!echo `${U+24}{${un}StrTok} "${ResultVar}" "${String}" "${Separators}" "${ResultPart}" "${SkipEmptyParts}"`
|
||||||
!verbose 2
|
!verbose 2
|
||||||
|
@ -1529,14 +1528,11 @@ o-----------------------------------------------------------------------------o
|
||||||
# StrTrimNewLines
|
# StrTrimNewLines
|
||||||
!insertmacro STRFUNC_DEFFUNC StrTrimNewLines `ResultVar|String` `Output|Text`
|
!insertmacro STRFUNC_DEFFUNC StrTrimNewLines `ResultVar|String` `Output|Text`
|
||||||
|
|
||||||
!macro STRFUNC_CALL_StrTrimNewLines un ResultVar String Type
|
!macro STRFUNC_CALL_StrTrimNewLines un ResultVar String
|
||||||
!verbose push ${STRFUNC_VERBOSITY}
|
!verbose push ${STRFUNC_VERBOSITY}
|
||||||
!echo `${U+24}{${un}StrTrimNewLines} "${ResultVar}" "${String}"`
|
!echo `${U+24}{${un}StrTrimNewLines} "${ResultVar}" "${String}"`
|
||||||
!verbose 2
|
!verbose 2
|
||||||
Push `${String}`
|
Push `${String}`
|
||||||
Push `${Separators}`
|
|
||||||
Push `${ResultPart}`
|
|
||||||
Push `${SkipEmptyParts}`
|
|
||||||
!insertmacro STRFUNC_CALL StrTrimNewLines "${un}"
|
!insertmacro STRFUNC_CALL StrTrimNewLines "${un}"
|
||||||
Pop ${ResultVar}
|
Pop ${ResultVar}
|
||||||
!verbose pop
|
!verbose pop
|
||||||
|
|
|
@ -328,7 +328,7 @@ How to use
|
||||||
=========================================================================
|
=========================================================================
|
||||||
*** ${StrSort}
|
*** ${StrSort}
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
ResultVar String LeftStr CenterStr RightStr IncludeLeftStr(1|0)
|
ResultVar String CenterStr LeftStr RightStr IncludeLeftStr(1|0)
|
||||||
IncludeCenterStr(1|0) IncludeRightStr(1|0)
|
IncludeCenterStr(1|0) IncludeRightStr(1|0)
|
||||||
=========================================================================
|
=========================================================================
|
||||||
Searches for "CenterStr" in "String", and returns only the value
|
Searches for "CenterStr" in "String", and returns only the value
|
||||||
|
@ -344,14 +344,14 @@ How to use
|
||||||
String
|
String
|
||||||
String where to search "CenterStr".
|
String where to search "CenterStr".
|
||||||
|
|
||||||
|
CenterStr
|
||||||
|
String to search in "String".
|
||||||
|
|
||||||
LeftStr
|
LeftStr
|
||||||
The first occurrence of "LeftStr" on the left of "CenterStr".
|
The first occurrence of "LeftStr" on the left of "CenterStr".
|
||||||
If it is an empty value, or was not found, will return
|
If it is an empty value, or was not found, will return
|
||||||
everything on the left of "CenterStr".
|
everything on the left of "CenterStr".
|
||||||
|
|
||||||
CenterStr
|
|
||||||
String to search in "String".
|
|
||||||
|
|
||||||
RightStr
|
RightStr
|
||||||
The first occurrence of "RightStr" on the right of "CenterStr".
|
The first occurrence of "RightStr" on the right of "CenterStr".
|
||||||
If it is an empty value, or was not found, will return
|
If it is an empty value, or was not found, will return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue