(refs #445)Fix yen to backslash

This commit is contained in:
takezoe
2014-07-27 17:11:27 +09:00
parent 34e299bf52
commit 2a8706630a
2 changed files with 3 additions and 3 deletions

View File

@@ -54,9 +54,9 @@ object StringUtil {
* @return the converted content
*/
def convertLineSeparator(content: String, lineSeparator: String): String = {
val lf = content.replaceAll("¥r¥n", "¥n").replaceAll("¥r", "¥n")
val lf = content.replace("\r\n", "\n").replace("\r", "\n")
if(lineSeparator == "CRLF"){
lf.replaceAll("¥n", "¥r¥n")
lf.replace("\n", "\r\n")
} else {
lf
}