How to create a tab with get property system?

I know that I can find a new system line with

     System.getProperty("line.separator");  

will there always be a line.separator string?

How can I do the same for tab \ t?

+4
source share
3 answers

I do not think that there is an equivalent for tabs \t- one character. while the system property line.separatoris ( oracle docs )

The sequence used by the operating system to split lines in text files

which means that it can be more than one character depending on the operating system in which the application is running. It can be \neither \ror \r\n.

\t, . .

+1

tab, '\t'

+2

"line.separator" - , .

/t , , . .

0

Source: https://habr.com/ru/post/1548195/


All Articles