开发者

What the meaning of various types of white space in Java?

开发者 https://www.devze.com 2022-12-23 00:10 出处:网络
What is 开发者_开发技巧difference of below escape sequences for white space? \\t, \\n, \\x0B, \\f and \\r.

What is 开发者_开发技巧difference of below escape sequences for white space?

\t, \n, \x0B, \f and \r.


  • \t      The tab character (\u0009)
  • \n      The newline (line feed) character (\u000A)
  • \r      The carriage-return character (\u000D)
  • \f      The form-feed character (\u000C)
  • \x0B  The vertical tabulation (VT) character


\t - Horizontal tab
\n - New line
\x0B - Vertical tab
\f - form feed
\r - carriage return


Looks like you left out the operators, but I'm interpreting you to want to know how various Java APIs handle those characters.

The Java handling of these characters is determined by their Unicode character properties. See the Unicode spec to see what properties they have, and thus what the different functions in Character return for them.

www.unicode.org will tell you all you ever wanted to know about Unicode properties.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号