如何使用系统获取属性创建选项卡? [英] how to create tab with system get property?
问题描述
我知道我可以找到新的系统行
I know that I can find the new line of system with
System.getProperty("line.separator");
line.separator是否总是换行?
does the line.separator will be always new line ?
我如何为tab \t做同样的事情?
How I can do the same for tab \t?
推荐答案
我认为没有相应的选项卡, \t
是一个单个字符。而系统属性 line.separator
是一个( oracle docs )
I dont think there is an equivalent for tab, \t
is a single character. while the system property line.separator
is a (oracle docs)
操作系统用来分隔文本文件中的行的序列
Sequence used by operating system to separate lines in text files
这意味着它可以是多个字符,具体取决于运行应用程序的操作系统。它可以是 \ n
或 \ r
或 \\\\ n
。
which mean it can be more than one character depending on the operation system the application running on. It can be \n
or \r
or \r\n
.
许多文本编辑应用程序提供替换Tab键按一系列空格而不是单个字符 \t
,用户可以从中定义长度。这由应用程序本身处理。
Many text editing application offer to replace a tab key press by a sequence of spaces instead of the single character \t
, from which users may define the length. This is handled by the application itself.
这篇关于如何使用系统获取属性创建选项卡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!