Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

str_decrement

Description

Decrement an alphanumeric string

Syntax

str_decrement(
    string $string
): string

Parameters

string

The input string.

Return

Returns the decremented alphanumeric ASCII string.

Examples

1

<?

$string = 'b';

$return = str_decrement($string);

echo $return;

?>
a

2

<?

$string = 'aa';

$return = str_decrement($string);

echo $return;

?>
z

3

<?

$string = 'ba';

$return = str_decrement($string);

echo $return;

?>
az

4

<?

$string = '1';

$return = str_decrement($string);

echo $return;

?>
0

5

<?

$string = '10';

$return = str_decrement($string);

echo $return;

?>
9
HomeMenu