Rename a member value from an existing enumerator type.
mod_enum(enum, 'ren', name, to)
Argument | Type | Description |
---|---|---|
enum | str | Name of the enumerator type where the member has to be removed from. |
'ren' |
str | Passing this argument will result in a rename action. |
name | str | Name of the member that has to be modified. |
to | str | New name for the member that has to be modified. |
The value nil
.
This code shows how to use the action ren:
// Create enum `Color`
set_enum('Color', {
RED: '#ff0000',
GREEN: '#00ff00',
SKY: '#0000ff',
});
// Modify `SKY` to `BLUE`
mod_enum('Color', 'ren', 'SKY', 'BLUE');
Return value in JSON format
null