How does one represent the empty char?

前端 未结 9 1329
闹比i
闹比i 2020-12-22 18:06

I\'m currently writing a little program but I keep getting this error when compiling

error: empty character constant

I realize i

9条回答
  •  轮回少年
    2020-12-22 18:18

    String before = EMPTY_SPACE+TAB+"word"+TAB+EMPTY_SPACE;

    Where EMPTY_SPACE = " " (this is String) TAB = '\t' (this is Character)

    String after = before.replaceAll(" ", "").replace('\t', '\0');

    means after = "word"

提交回复
热议问题