mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-22 23:29:34 +00:00
Hex conversion now ignores case.
This commit is contained in:
parent
753a8ecbf6
commit
2771ce9b71
@ -297,8 +297,10 @@ public class AppleUtil {
|
|||||||
* a hex string that may start with a '$' and has 1 - 4 digits.
|
* a hex string that may start with a '$' and has 1 - 4 digits.
|
||||||
*/
|
*/
|
||||||
public static int convertFormattedWord(String word) {
|
public static int convertFormattedWord(String word) {
|
||||||
|
if (word == null) return 0;
|
||||||
int value = 0;
|
int value = 0;
|
||||||
for (int i=0; word != null && i<word.length(); i++) {
|
word = word.toUpperCase();
|
||||||
|
for (int i=0; i<word.length(); i++) {
|
||||||
char ch = word.charAt(i);
|
char ch = word.charAt(i);
|
||||||
for (int nybble = 0; nybble < hexDigits.length; nybble++) {
|
for (int nybble = 0; nybble < hexDigits.length; nybble++) {
|
||||||
if (ch == hexDigits[nybble].charAt(0)) {
|
if (ch == hexDigits[nybble].charAt(0)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user