change_char()

change_char()#

Change a specific character in a string to another character.

Prototype

PUBLIC void change_char(
    char        *string,
    char         from,
    char         to
);
        

Parameters

Key

Type

Description

string

char *

The string to modify.

from

char

The character to replace.

to

char

The character to replace it with.


Return Value

No return value. The function modifies the string in place.

Prototype

// Not applicable in JS

Prototype

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