HH\Lib\Str\strip_suffix

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

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

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

Description

namespace HH\Lib\Str;

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

Parameters

  • string $string
  • string $suffix