String.starts_with

String.starts_with

String.starts_with

Function

Determine whether the string starts with the specified prefix.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
prefixAnyNoNoneThe prefix to be matched will be converted to a string first when called.

Return value

TypeDescription
BoolReturns true if the match is successful, otherwise returns false.

Example

Notes

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