replace (chars, array_length (chars), string, token, replacement);

replace (chars, array_length (chars), string, token, replacement, STR_RIGHT);

replace (chars, array_length (chars), string, token, replacement, start_position);

replace (chars, array_length (chars), string, token, replacement, start_position, STR_RIGHT);