HH\Lib\Str\strip_prefix

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

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

Returns the string with the given prefix removed, or the string itself if it doesn't start with the prefix

Description

namespace HH\Lib\Str;

function strip_prefix(
  string $string,
  string $prefix,
): string;

Parameters

  • string $string
  • string $prefix