私のために働く:
Function Trim
Exch $R1 ; Original string
Push $R2
Loop:
StrCpy $R2 "$R1" 1
StrCmp "$R2" " " TrimLeft
StrCmp "$R2" "$\r" TrimLeft
StrCmp "$R2" "$\n" TrimLeft
StrCmp "$R2" "$\t" TrimLeft
GoTo Loop2
TrimLeft:
StrCpy $R1 "$R1" "" 1
Goto Loop
Loop2:
StrCpy $R2 "$R1" 1 -1
StrCmp "$R2" " " TrimRight
StrCmp "$R2" "$\r" TrimRight
StrCmp "$R2" "$\n" TrimRight
StrCmp "$R2" "$\t" TrimRight
GoTo Done
TrimRight:
StrCpy $R1 "$R1" -1
Goto Loop2
Done:
Pop $R2
Exch $R1
FunctionEnd
!define Trim "!insertmacro Trim"
!macro Trim ResultVar String
Push "${String}"
Call Trim
Pop "${ResultVar}"
!macroend
Section
${Trim} $0 " First Name "
MessageBox mb_ok "|$0|"
SectionEnd
質問を編集して、失敗するサンプルコードを含めることができますか?