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 |
---|---|---|
|
|
The input string from which trailing occurrences of |
|
|
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