HH\Lib\Str\starts_with
Requires the Hack Standard Library to be installed.
Facebook Engineer?
This function is available as Str\starts_with()
in Facebook's www repository.
Returns whether the string starts with the given prefix
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
Returns
bool