标签:style blog ar color sp for div log bs
1 private static int getDecimal(String strHex){ 2 3 char[] t = {‘0‘,‘1‘,‘2‘,‘3‘,‘4‘,‘5‘,‘6‘,‘7‘,‘8‘,‘9‘,‘a‘,‘b‘,‘c‘,‘d‘,‘e‘,‘f‘}; 4 int len = strHex.length(); 5 int result = 0; 6 for(int i = len;i>0;i--){ 7 char c = strHex.charAt(i-1); 8 for(int j=0;j<t.length;j++){ 9 if(c==t[j]){ 10 result+=j<<((len - i )*4); 11 } 12 } 13 } 14 return result; 15 }
标签:style blog ar color sp for div log bs
原文地址:http://www.cnblogs.com/linson0116/p/4118769.html