Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
583 views
in Technique[技术] by (71.8m points)

java - how to create tab with system get property?

I know that I can find the new line of system with

     System.getProperty("line.separator");  

does the line.separator will be always new line ?

How I can do the same for tab ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I dont think there is an equivalent for tab, 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

which mean it can be more than one character depending on the operation system the application running on. It can be or or .

Many text editing application offer to replace a tab key press by a sequence of spaces instead of the single character , from which users may define the length. This is handled by the application itself.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...