HH\Lib\Str\strip_prefix

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

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

namespace HH\Lib\Str;

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

Parameters

  • string $string
  • string $prefix