File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
library/src/scala/tasty/util Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ import java.lang.Character.OTHER_LETTER
88import java .lang .Character .TITLECASE_LETTER
99import java .lang .Character .UPPERCASE_LETTER
1010
11- import scala .annotation .switch
12-
1311/** Contains constants and classifier methods for characters */
1412@ deprecated(" Use scala.internal.Chars" , " 0.17" )
1513object Chars {
@@ -20,15 +18,15 @@ object Chars {
2018 final val SU = '\u001A '
2119
2220 /** Convert a character digit to an Int according to given base,
23- * -1 if no success
24- */
21+ * -1 if no success
22+ */
2523 def digit2int (ch : Char , base : Int ): Int = {
2624 val num = (
2725 if (ch <= '9' ) ch - '0'
2826 else if ('a' <= ch && ch <= 'z' ) ch - 'a' + 10
2927 else if ('A' <= ch && ch <= 'Z' ) ch - 'A' + 10
3028 else - 1
31- )
29+ )
3230 if (0 <= num && num < base) num else - 1
3331 }
3432 /** Buffer for creating '\ u XXXX' strings. */
You can’t perform that action at this time.
0 commit comments