docs: private static int[] getMode2PrimaryCodewords(String postcode, int country, int service) {
  
          for (int i = 0; i < postcode.length(); i++) {
              if (postcode.charAt(i) < '0' || postcode.charAt(i) > '9') {
                  postcode = postcode.substring(0, i);
                  break;
              }
          }
  
          int postcodeNum = Integer.parseInt(postcode);
  
          int[] primary = new int[10];
          primary[0] = ((postcodeNum & 0x03) << 4) | 2;
          primary[1] = ((postcodeNum & 0xfc) >> 2);
          primary[2] = ((postcodeNum & 0x3f00) >> 8);
          primary[3] = ((postcodeNum & 0xfc000) >> 14);
          primary[4] = ((postcodeNum & 0x3f00000) >> 20);
          primary[5] = ((postcodeNum & 0x3c000000) >> 26) | ((postcode.length() & 0x3) << 4);
          primary[6] = ((postcode.length() & 0x3c) >> 2) | ((country & 0x3) << 4);
          primary[7] = (country & 0xfc) >> 2;
          primary[8] = ((country & 0x300) >> 8) | ((service & 0xf) << 2);
          primary[9] = ((service & 0x3f0) >> 4);
  
          return primary;
      }