HH\Lib\Str\starts_with

This API is part of the Hack Standard Library, not HHVM itself.
Facebook Engineer?

This function is available as Str\starts_with() in Facebook's www repository.

Returns whether the string starts with the given prefix

Description

namespace HH\Lib\Str;

function starts_with(
  string $string,
  string $prefix,
): bool;

For a case-insensitive check, see Str\starts_with_ci().

Parameters

  • string $string
  • string $prefix