@stringinstring()

Finds one string within another string.

Syntax

@stringinstring (string1, string2, case sensitive flag)

Type

HyperMesh Template Function

Description

Finds one string within another string. Returns 1 if the string is found, otherwise, 0.

Inputs

string1
The string that is searched.
string2
The string to be found.
case sensitive flag
If set to 1, the search only succeeds if the case type of the two strings match exactly. For example, "Monday" will not match "monday".

Example

*materials("")
  *format()
    *if([@stringinstring(name,"Elastic",1) == 1])
      *string("Elastic material found: ")
      *field(string,name,0)
      *end()
    *endif()
*output()

Errors

None.