sazr
sazr

Reputation: 25938

How do I use/include StrContains in NSIS

Do I need to include a specific .nsh library or function definition to use the function 'StrContains' in NSIS?

I have looked for a download for the library but I cant seem to find it?

When I go to compile this code I get the compile error: "Invalid command: ${StrContains}"

!include "LogicLib.nsh"

# Compile error below
!macro test
   ${StrContains} $0 $1 "abc"
!macroend

Section 
  DetailPrint ""
SectionEnd

Upvotes: 0

Views: 4863

Answers (1)

Seki
Seki

Reputation: 11465

You need to add the function definition shown in the StrContains function page of the NSIS wiki (in the category of strings functions) in your code.

Don't forget the last statement !define StrContains ... to be able to call it with ${StrContains}

Upvotes: 3

Related Questions