File tree 1 file changed +3
-5
lines changed
library/src/scala/tasty/util
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
8
8
import java .lang .Character .TITLECASE_LETTER
9
9
import java .lang .Character .UPPERCASE_LETTER
10
10
11
- import scala .annotation .switch
12
-
13
11
/** Contains constants and classifier methods for characters */
14
12
@ deprecated(" Use scala.internal.Chars" , " 0.17" )
15
13
object Chars {
@@ -20,15 +18,15 @@ object Chars {
20
18
final val SU = '\u001A '
21
19
22
20
/** Convert a character digit to an Int according to given base,
23
- * -1 if no success
24
- */
21
+ * -1 if no success
22
+ */
25
23
def digit2int (ch : Char , base : Int ): Int = {
26
24
val num = (
27
25
if (ch <= '9' ) ch - '0'
28
26
else if ('a' <= ch && ch <= 'z' ) ch - 'a' + 10
29
27
else if ('A' <= ch && ch <= 'Z' ) ch - 'A' + 10
30
28
else - 1
31
- )
29
+ )
32
30
if (0 <= num && num < base) num else - 1
33
31
}
34
32
/** Buffer for creating '\ u XXXX' strings. */
You can’t perform that action at this time.
0 commit comments