AscB()是用来干什么的呀?描述一下看看?

解决方案 »

  1.   

    AscB 传回字符串第一个位元字码 
        用法:传回值 = AscB(字)     例:
        MyVal = AscB("A")
        MyVal的值为65     MyVal = AscB("小")
        MyVal的值为15
      

  2.   

    public class tt{  public  static void main(String argu[]){
        int  sVal = getStringValue("AB");
        System.out.println(sVal);  }
      public static int getStringValue(String test){
        if(test!=null){
          String s = new String();
          s = test.substring(0,1);
          return s.hashCode();
        }else
          return -1;  
      }}
      

  3.   

    byte jAscB(String str)
    {
      return str.getBytes("GBK")[0]; //确保你的str不为空  
    }