8000 clean code · CJavaScala/native2ascii@2e382ef · GitHub
[go: up one dir, main page]

Skip to content

Commit 2e382ef

Browse files
author
Peng.Li
committed
clean code
1 parent bec9f34 commit 2e382ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/scala/centaur/Native2Ascii.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ object Native2Ascii extends App {
1616
val Array(head, tail@_*) = s.split( """\\u""")
1717
head + tail.flatMap {
1818
case str if str.length >= 4 =>
19-
val (u, normal) = str.splitAt(4)
20-
Seq(unescapeUnicodeChar(u), normal)
19+
val (unicode, asciiChars) = str.splitAt(4)
20+
Seq(unescapeUnicodeChar(unicode), asciiChars)
2121
case str => Seq(str)
2222
}.mkString
2323
}.mkString( """\\""")

0 commit comments

Comments
 (0)
0