Added number convert method

This commit is contained in:
Willem Cazander 2022-02-10 14:45:52 +01:00
parent a19fa34f44
commit bb76cbbe2f
2 changed files with 17 additions and 0 deletions

View file

@ -112,4 +112,17 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> {
BBC.BOON_INIT(this);
this.BȍőnJmxInit(BãßBȍőnGlyphSetKeyʸᴰ.JMX);
}
public String BȍőnConvertTo(String numbers) {
StringBuilder buf = new StringBuilder();
for (char c:numbers.toCharArray()) {
for (BaseGlyphSet set:values()) {
int loc = set.BȍőnGlyphSetNumber10().BȍőnIndexOf(""+c);
if (loc != -1) {
buf.append(set.BȍőnGlyphSetNumber10().BȍőnCharFor(loc));
}
}
}
return buf.toString();
}
}

View file

@ -114,6 +114,10 @@ public final class BaseGlyphSetNumber {
return chars.get(number);
}
public int BȍőnIndexOf(String str) {
return chars.indexOf(str);
}
public String BȍőnCharSeperator() {
return charSeperator;
}