String.contains

String.contains

String.contains

Function

Determine whether the string contains the specified fragment.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
needleAnyNoNoneThe fragment to be found will be converted into a string first when called.

Return value

TypeDescription
BoolReturns true if included, false otherwise.

Example

Notes

  • Matching is case sensitive.
  • Return false when no parameters are passed to avoid empty parameters being mismatched as empty strings.