src/Lib/Strings.php
protected static function __chomp(string $toChomp, string $string) : string
    {
        /** @noinspection PhpParamsInspection */
        $chomp = Lambda::compose(self::lchomp($toChomp), self::rchomp($toChomp));

        return $chomp($string);
    }
protected static function __chomp(string $toChomp, string $string) : string
    {
        /** @noinspection PhpParamsInspection */
        $chomp = Lambda::compose(self::lchomp($toChomp), self::rchomp($toChomp));

        return $chomp($string);
    }
protected static function __chomp ( string $ toChomp , string $ string ) : string { /** @noinspection PhpParamsInspection */ $ chomp = Lambda :: compose ( self :: lchomp ( $ toChomp ) , self :: rchomp ( $ toChomp ) ) ; return $ chomp ( $ string ) ; }
Two-Sided Chomp

Removes the specified substring from both ends of the target string. Unlike PHP's
trim function, the substring to chomp is not a character mask -- rather it is a full
substring. This function is case sensitive.

@example
Strings::chomp('a', 'abccba'); // 'bccb'
Strings::chomp('ab', 'abccba'); // 'abccba'
Strings::chomp('A', 'abccba'); // 'abccba'

@type String -> String

@param  String $toChomp string to chomp
@param  String $string string to be chomped
@return string
Two - Sided Chomp