c# - 如何在字符串末尾插入退格

标签 c# .net string word backspace

是否可以在字符串后插入一个退格键。如果可能的话 如何在字符串中插入退格??

最佳答案

退格键的转义序列是:

\b

https://social.msdn.microsoft.com/Forums/en-US/cf2e3220-dc8d-4de7-96d3-44dd93a52423/what-character-escape-sequences-are-available-in-c?forum=csharpgeneral

C# defines the following character escape sequences:

  • \' - single quote, needed for character literals
  • \" - double quote, needed for string literals
  • \\ - backslash
  • \0 – Null
  • \a - Alert
  • \b - Backspace
  • \f - Form feed
  • \n - New line
  • \r - Carriage return
  • \t - Horizontal tab
  • \v - Vertical quote
  • \u - Unicode escape sequence for character
  • \U - Unicode escape sequence for surrogate pairs.
  • \x - Unicode escape sequence similar to "\u" except with variable length.

关于c# - 如何在字符串末尾插入退格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17408296/

相关文章:

string - 一次生成一个字母的有限状态机

java - 如何将具有特殊字符的字符串转换为转义的另一个字符串

c# - linq to sql SubmitChanges 不触发具有多个 InsertOnSubmit 或 DeleteOnSubmit 的触发器

c# - 我如何检测当前系统是什么语言

c# - 如何在 Unity 中为 Android 游戏仅获取 "jump"命令的初始触摸

c# - 当我调试在设计模式下打开特定窗体的项目时,Visual Studio 崩溃。."Catastrophic failure"

c# - 最大化系统托盘中的应用程序?

c# - 从 WCF 返回大字节数组 - 内存问题

.net - 服务启动时的 DLL 加载顺序

c++ - 如何获取 `std::basic_string<CustomClass>`进行编译?