Supported Versions: PHP 8
Checks if a string ends with a given substring
str_ends_with(string $haystackstring $needle): bool
                $s ReflectionCaster::castFunctionAbstract($r, [], new Stub(), trueCaster::EXCLUDE_VERBOSE);

                
$s ReflectionCaster::getSignature($s);



                if (
str_ends_with($identifier'()')) {

                    
$this->value substr_replace($identifier$s, -2);

                } else {

                    
$this->value .= $s;
            } else {

                
$value "\033[{$this->styles[$style]}m".$value;

            }

            if (
$cchrCount && str_ends_with($value$endCchr)) {

                
$value substr($value0, -\strlen($endCchr));

            } else {

                
$value .= "\033[{$this->styles['default']}m";