delete_right_char()

delete_right_char()#

delete_right_char() removes all trailing occurrences of the specified character x from the string s.

Prototype

char *delete_right_char(char *s, char x);

Parameters

Key

Type

Description

s

char *

The input string from which trailing occurrences of x will be removed.

x

char

The character to be removed from the end of the string.


Return Value

Returns a pointer to the modified string s.

Notes

The function modifies the input string in place by replacing trailing occurrences of x with the null terminator.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples