• Post Reply Bookmark Topic Watch Topic
  • New Topic

output pblm

 
SHINU .R SHINU .R
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i need to arrange out put in proper format while writing to a file.For this purpose i set maxium length as 50.My idea is generated substring is less than 5O add that much blank space and write to file.For this ineed to know one "\t" is how much character and secondly how implement that......My logic is that set maxium length as 50 and store the generated string on temporary variable .Find the difference betwwen maxium and generated string and store in an intger variable delta....after that i could not procced how append "\t" with the generated substring.Can any body help with code it will be better help for me....
 
Joe Ess
Bartender
Posts: 9361
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "tab" character is a single character. It is represented as more by whatever is reading the file (console, text editor, printer and so on). Since these agents can represent tabs as various widths, you are probably best off replacing instances of '\t' with a known number of spaces.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"SHINU .R SHINU .R",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
SHINU .R SHINU .R
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
one more thing inotice that..if i look generated file in notepad it working properly..but only in editplus some special characters like[][][] come...suggestions and help welcome
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"SHINU .R SHINU .R", you have previously been warned on one or more occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.

Be aware that accounts with invalid display names are removed.

bear
JavaRanch Sheriff
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!