You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param lowerCaseOther | Other lower-case string to compare with. This must be lower-case in order for this to work!
776
+
* @param from | The beginning index, where to start with comprising (inclusive, most likely 0).
777
+
* @param to | The ending marking index, index where to end the comparing (exclusive, most likely <code>str.length()</code>)
778
+
*
779
+
* @return True if str is equal to lowerCaseOther given that str case is ignored and lowerCaseOther is lower-case, otherwise false. Similar to {@link String#equalsIgnoreCase(String)} but more optimal!<br>
780
+
* Note that this function was designed for non-blank ASCII strings and may not work properly for others...<br>
781
+
* Also sufficient length of both strings is not checked so adjust from and to accordingly.
* This converter is capable of converting {@link Number} including all common implementations like {@link Double}, {@link Float}, {@link Integer} and others. They are determine by suffixes like in java!
LogProvider.instance.logErr("Number " + arg + " is too big for its datatype! Try to change its datatype to double (suffix D)!", e2);
130
-
returnnull;
131
-
}
132
-
}
98
+
Numbernum;
99
+
if ((num = numberOf(arg, ch0, --len, 10, 0)) != null)
100
+
returnnum;
133
101
}
134
102
}
135
103
returnCONTINUE;
@@ -174,6 +142,101 @@ public String format(Number num)
174
142
returnnum.toString();
175
143
}
176
144
145
+
/**
146
+
* @param str | Source char sequence with number to parse.
147
+
* @param ch0 | Should be <code>str.charAt(0)</code>. This is to ensure that string is not null or empty and also for possible optimizations.
148
+
* @param end | Index of where to end with parsing. If whole string is meant to be parsed, then <code>str.length()-1</code>, should not be greater than that!
149
+
* @param base | Base of the parsed number. Theoretically can be anything but usually should be 2, 8, 10 or 16... Note that base will be overridden by suffixes <code>#</code>. for 16, <code>0x</code> for 16, <code>0b</code> for 2 or <code>0</code> for 8 (only if not followed by <code>.</code>).
150
+
* @param type | Preferred datatype of of the number represented by suffixes 'S' for {@link Short}, 'Y' for {@link Byte}, 'L' for {@link Long}, 'D' for {@link Double}, 'F' for {@link Float}. Other stands for {@link Integer}.<br>
151
+
* Note that floating point numberer will be treated as {@link Double} if no suffix is present by default. Also numbers in E-notation format with negative exponents can be converted to {@link Double}. Further more, integers will be auto-converted to {@link Long} if overflow should occur!<br>
152
+
* Important thing to know is that this argument will be overridden by suffix from str if present!
0 commit comments