code: public static String percentEncode(String string) {
          String encoded = formURLEncode(string);
  
          for (EncodingRule rule : ENCODING_RULES) {
              encoded = rule.apply(encoded);
          }
  
          return encoded;
      }
docs: Percent encodes a string
  
  @param string plain string
  @return percent encoded string