public class DigitMap
{
public String getDigitMapResult(String sdm, String destString){
int startparenthesis = sdm.indexOf("(");
int endparenthesis = sdm.indexOf(")");
String sdms = sdm.substring(startparenthesis+1, endparenthesis);
String[] sArr = sdms.split("\\|");
char[] tb = destString.toCharArray();
int tblength = tb.length;
int matchCountPM = 0;
int matchCountUM = 0;
for (String string : sArr)
{
char[] carr = string.toCharArray();
int clength = carr.length;
int i,j;
char[] preChar = new char[2];
for(i = 0, j = 0; i < clength && j<tblength; i++,j++){
if((carr[i]>='0'&&carr[i]<='9')||(carr[i]>='A'&&carr[i]<='K')){
preChar[0] = preChar[1] = carr[i];
if(!check(carr[i],tb[j])){
break;
}
}else i
Digmap匹配
最新推荐文章于 2020-07-24 12:56:20 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)