code: public int getBoneIndex(String bonename)
      {
          for (int i = 0; i < getNumBones(); ++i)
  
              if (mBoneNames[i].equals(bonename))
                  return i;
          return -1;
      }
docs: Get the bone index for the bone with the given name.
  
  @param bonename string identifying the bone whose index you want
  @return 0 based bone index or -1 if bone with that name is not found.