code: public static int compare(String stra, String strb) {
          // Note: This implementation is a literal copy of
          // uprv_comparePropertyNames.  It can probably be improved.
          int istra=0, istrb=0, rc;
          int cstra=0, cstrb=0;
          for (;;) {
              /* Ignore delimiters '-', '_', and ASCII White_Space */
              while (istra<stra.length()) {
                  cstra = stra.charAt(istra);
                  switch (cstra) {
                  case '-':  case '_':  case ' ':  case '\t':
                  case '\n': case 0xb/*\v*/: case '\f': case '\r':
                      ++istra;
                      continue;
                  }
                  break;
              }
  
              while (istrb<strb.length()) {
                  cstrb = strb.charAt(istrb);
                  switch (cstrb) {
                  case '-':  case '_':  case ' ':  case '\t':
                  case '\n': case 0xb/*\v*/: case '\f': case '\r':
                      ++istrb;
                      continue;
                  }
                  break;
              }
  
              /* If we reach the ends of both strings then they match */
              boolean endstra = istra==stra.length();
              boolean endstrb = istrb==strb.length();
              if (endstra) {
                  if (endstrb) return 0;
                  cstra = 0;
              } else if (endstrb) {
                  cstrb = 0;
              }
  
              rc = asciiToLowercase(cstra) - asciiToLowercase(cstrb);
              if (rc != 0) {
                  return rc;
              }
  
              ++istra;
              ++istrb;
          }
      }
docs: Compare two property names, returning <0, 0, or >0.  The
  comparison is that described as "loose" matching in the
  Property*Aliases.txt files.