replace string with char[]