If EDITOR is set to vi, you type part of name, and then click Escape followed by a backslash (\) character.
如果EDITOR设置为vi,那么您键入部分名称,然后按esc键,后跟反斜杠(\)字符。
So, if I want to encode O'Reilly in a single quoted string, I must escape it using backslash, 'O\'Reilly'.
所以,如果我想用单引号编码 O'Reilly,我就必须使用反斜杠对它进行转义:'O\'Reilly'。
A backslash can escape a double quote, or any single whitespace character.
后斜杠可以对双引号或任一空白字符进行转义。
It gets really kind of trippy if you wanna output a backslash, \ you can't just use the backslash, \\ you need to use backslash backslash because otherwise a single backslash is confused with the so called escape character.
如果你想输出一个反斜杠,估计又得迷糊了,实际上,你不能直接用,而是要,否则一个\可能会被误认为,是转义字符。
So you have what are called escape characters like backslash N that is the shorthand notation of telling the computer put a new line character here.
幸亏我们有一些类似反斜杠n的转义字符,这只是一种简化方式,用来告知电脑要在这新添一行。
应用推荐