File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

character to insert space

 
vivek ja
Ranch Hand
Posts: 80
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I insert spaces in output string?
Similar to \t for tab what is the character for space?

Also is there any site where there is a list of these characters?
 
K Riaz
Ranch Hand
Posts: 375
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
" "
 
Ryan McGuire
Ranch Hand
Posts: 1048
4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A space between single quotes in the source code is a Space char.

e.g.


If you want something that uses more toner from your laser printer, you could use the C type /xxx escape sequence (where xxx is an octal number).

'\t' = '\011'
' ' = '\040'

Here is page with the whole list.
TAB is '\t'
CR is '\r'
LF is '\n'
BS is '\b'
FF is '\f'

Java introduces Unicode escape sequences. \uxxxx where xxxx is a four hexadecimal digit Unicode number. For a Space use '\u0020'.

Ryan
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic