1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Xomw: Standardize static classes [#633]

This commit is contained in:
gnosygnu
2020-01-05 08:52:37 -05:00
parent 5aec368f8d
commit 5e2ce08abb
66 changed files with 353 additions and 410 deletions

View File

@@ -56,7 +56,7 @@ public class Char_ {
if (itm == match) return true;
return false;
}
public static int To_int_or(char c, int or) {
public static int To_digit_or(char c, int or) {
switch (c) {
case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4;
case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9;

View File

@@ -40,7 +40,7 @@ public class Long_ {
if (raw == null || rawLen == 0) return or;
long rv = 0, factor = 1; int tmp = 0;
for (int i = rawLen; i > 0; i--) {
tmp = Char_.To_int_or(String_.CharAt(raw, i - 1), Int_.Min_value);
tmp = Char_.To_digit_or(String_.CharAt(raw, i - 1), Int_.Min_value);
if (tmp == Int_.Min_value) return or;
rv += (tmp * factor);
factor *= 10;