HH\Lib\Str\strip_prefix

Meta Engineer?

This is available as Str\strip_prefix in the www repository.

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;

Guide

Parameters

  • string $string
  • string $prefix

Returns

  • string