Unicode 字符“BACKSPACE”(U+0008) 在编程中的用途是什么?它可以用于哪些应用?
On output to a terminal, it typically moves the cursor one position to the left (depending on settings). On input, it typically erases the last entered character (depending on the application and terminal settings), though the DEL / DELETE character is also used for this purpose. Typically it can be entered by pressing Backspace or Control-H
请注意,其删除字符的操作仅发生在显示器上,而不是在内存中。正在运行的程序中的字符串可以包含几乎任何字符序列(可能取决于语言),包括退格键。在这种情况下,它通常只是另一个角色。例如,在 C 中strlen("abcd\b")
是 5,不是 3。
在 C 和许多其他语言中,它在程序源中表示为'\b'
。有时显示为^H
.
无论是否表示为 Unicode,所有这些都适用。退格字符是大多数或所有字符集所共有的:ASCII、Latin-1、各种 Unicode 表示形式——甚至 EBCDIC 也有退格字符(但具有不同的代码)。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)