HH\Lib\Str\strip_suffix

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

Returns the string with the given suffix removed, or the string itself if it doesn't end with the suffix

namespace HH\Lib\Str;

function strip_suffix(
  string $string,
  string $suffix,
): string;

Parameters

  • string $string
  • string $suffix