在换行符之前的字符串末尾的 C 字符串中的退格转义字符被忽略(在 Mac OS X 终端中)。
printf("hello, worl\bd"); // => hello word (OK)
printf("hello, world\b"); // => hello worl (OK)
printf("hello, world\b\n"); // => hello world\n (Why not hello worl\n ?)
为什么会这样?
在换行符之前的字符串末尾的 C 字符串中的退格转义字符被忽略(在 Mac OS X 终端中)。
printf("hello, worl\bd"); // => hello word (OK)
printf("hello, world\b"); // => hello worl (OK)
printf("hello, world\b\n"); // => hello world\n (Why not hello worl\n ?)
为什么会这样?