To Kichik:
If you feel this should be reported as a bug in NSIS, let me know.
Details
Here's the example code:
The answer for the first WordFind call returns 2, when it should only be 1. But, the function works fine when you are dealing with paths (from the 2nd WordFind call above)OutFile "testme.exe"
ShowInstDetails show
!include WordFunc.nsh
!insertmacro WordFind
!define String "one|two|three|four|five"
Section
DetailPrint "String = ${String}"
DetailPrint '${WordFind} "${String}" "three" "#" $1'
${WordFind} "${String}" "three" "#" $1
DetailPrint "Answer: $1"
Strcpy $1 ""
DetailPrint "Example in manaual:"
DetailPrint '${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" " C:\" "#" $1'
${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" " C:\" "#" $1
DetailPrint "answer: $1"
SectionEnd