Skip to main content

startsWith

Checks whether a string starts with a specified prefix

startsWith(str, prefix)

Parameters#

  • str: Target string
  • prefix: Prefix by which str starts

Returns#

  • Boolean indicating the result.