Closed bytemain closed 1 year ago
https://en.wikipedia.org/wiki/Escape_character
JavaScript uses the \ (backslash) as an escape character for:[1][2]
\'
single quote\"
double quote\\
backslash\n
new line\r
carriage return\t
tab\b
backspace\f
form feed\v
vertical tab (Internet Explorer 9 and older treats '\v as 'v instead of a vertical tab ('\x0B). If cross-browser compatibility is a concern, use \x0B instead of \v.)\0
null character (U+0000 NULL) (only if the next character is not a decimal digit; else it is an octal escape sequence)\xFF
character represented by the hexadecimal byte "FF"@bytemain 收到
可以用这两个库:
感谢大佬,希望之后可以更新一下 utools 插件带上这个特性
在开发中,有些文本复制出来是带
\n
的,这个时候想把\n
去掉,有个工具的话就很方便。Example
Input:
Output: