private static int labelEnd(String s){
  int colonIndex=s.indexOf(":");
  int semicolonIndex=s.indexOf(";");
  if ((semicolonIndex == -1) || (colonIndex < semicolonIndex)) {
    return colonIndex;
  }
 else {
    return -1;
  }
}

private static int labelEnd ( String s ) { int colonIndex = s . indexOf ( ":" ) ; int semicolonIndex = s . indexOf ( ";" ) ; if ( ( semicolonIndex == - 1 ) || ( colonIndex < semicolonIndex ) ) { return colonIndex ; } else { return - 1 ; } }
determines the position in the string where a label that might be contained ends
