开发者

Writing string to a file in java

I have a file which contains sql statements. Now in this file, I want to add a word "collate" after every 'char()开发者_Python百科' and 'varchar()' in the file. How do you do that?


Iterate through the file line by line. On each String do two replaceAll( ... ) using your Strings above. Then write each line into a new File. When done, rename the original file to some back-up name and rename the new file to the original file's name.

Edit 1
I just noticed your javascript tag. So what type of problem is this, Java or Javascript?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜