private int postBasicCategoryIndex(String category){
  boolean sawAtZero=false;
  int i=0;
  for (int leng=category.length(); i < leng; i++) {
    char ch=category.charAt(i);
    if (isLabelAnnotationIntroducingCharacter(ch)) {
      if (i == 0) {
        sawAtZero=true;
      }
 else       if (sawAtZero) {
        sawAtZero=false;
      }
 else {
        break;
      }
    }
  }
  return i;
}

private int postBasicCategoryIndex ( String category ) { boolean sawAtZero = false ; int i = 0 ; for ( int leng = category . length ( ) ; i < leng ; i ++ ) { char ch = category . charAt ( i ) ; if ( isLabelAnnotationIntroducingCharacter ( ch ) ) { if ( i == 0 ) { sawAtZero = true ; } else if ( sawAtZero ) { sawAtZero = false ; } else { break ; } } } return i ; }
returns the index of the first character that is after the basic label . that is , if category is " np - lgs " , it returns 2 . this routine assumes category ! = null this routine returns 0 iff the string is of length 0 . this routine always returns a number & lt ; = category . length ( ) , and so it is safe to pass it as an argument to category . substring ( ) .
