how to create tab with system get property?

前端 未结 3 770
长发绾君心
长发绾君心 2020-12-20 21:17

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

     System.getProperty(\"line.separator\");  

does the line.separator will be always ne

相关标签:
3条回答
  • 2020-12-20 21:42

    There is no such standard property for tab you can rely on '\t' character

    0 讨论(0)
  • 2020-12-20 21:46

    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

    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.

    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.

    0 讨论(0)
  • 2020-12-20 21:59

    "line.separator" - Sequence used by operating system to separate lines in text files. Check this out here

    /t is I believe software dependent, not system, so there is no such property. Here you can check some other properties too.

    0 讨论(0)
提交回复
热议问题