• Post Reply Bookmark Topic Watch Topic
  • New Topic

forcing lowercase in output file  RSS feed

 
Luigi Melanson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forgive me if I am not posting in the correct area.
I am hoping that someone could offer some suggestions on how to take a input file (containing upper case letters, words) and creating an output file that forces all letters to be lowercase.
This is line that I am struggling with.


if((char)ch <="z" && (char)ch >="a")ch

Any assistance would be appreciated
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use BufferedReader with FileReader class to read file line by line using readLine() method which returns you String represents a line.

then use String class, toLowerCase() method to covert it to lower case and then write it to the destination file.

hth,
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!