# Command: searchif

NEST HelpDesk | Command Index | NEST Quick Reference

Name:

    searchif - check wether a substring is contained within a string

Synopsis:

    string1 string2 searchif -> bool
      array1  array2  searchif -> bool

Examples:

    (Hello world!) (Hello) searchif -> true
      [1 3 2 5 2] [3 2]	 searchif -> true

Description:

      calls search and removes the substrings/-arrays generated
      thereby. Neither string/array will be conserved (!),
      bool contains success or failure.

Parameters:

    string1/array1: The object where to search into.
      string2/array2: The subobject to look for.
      bool is true on success, otherwise false

Bugs:

    Does not have optimal performance; search creates subobjects
      which are not needed for serachif.

Remarks:

Author:

    Hehl

FirstVersion:

    April 15, 1999

SeeAlso:

- search

Source:

    /opt/conda/conda-bld/nest_1512418773968/work/nest-2.14.0/lib/sli/misc_helpers.sli

NEST HelpDesk | Command Index | NEST Quick Reference

© 2004 The NEST Initiative