Dj Nyx
15th March 2004 08:57 UTC
compare strings
Hi
following problem:
in my setup i have to compare 2 strings... but i'd to make it like in other programming languages...
[like this:
strin2 then
>!insertmacro bla_bla_bla
>else
!insertmacro nz_nz_nz
>
]
is there any way to do this that way?
or is there any chance to do it like this...
strcmp string1 string2 !insertmacro bla !insertmacro nz
>
deguix
15th March 2004 10:05 UTC
4.9.4.19 StrCmp
str1 str2 jump_if_equal [jump_if_not_equal]
Compares (case insensitively) str1 to str2. If str1 and str2 are equal, Gotos jump_if_equal, otherwise Gotos jump_if_not_equal.
I.e.:
StrCmp "OH" "blablabla" 0 +10
Comm@nder21
15th March 2004 14:39 UTC
another example:
macro macro_notequal
>!macroend
>!macro macro_equal
>!macroend
Section"dummy_section" dummy_index
StrCmp"$1" "$2" equal
>!insertmacro macro_notequal
Goto end
equal:
!insertmacro macro_equal
end:
>SectionEnd
>