code: public static HsqlProperties delimitedArgPairsToProps(String s,
              String pairsep, String dlimiter, String type) {
  
          HsqlProperties props       = new HsqlProperties();
          int            currentpair = 0;
  
          while (true) {
              int nextpair = s.indexOf(dlimiter, currentpair);
  
              if (nextpair == -1) {
                  nextpair = s.length();
              }
  
              // find value within the segment
              int valindex = s.substring(0, nextpair).indexOf(pairsep,
                                         currentpair);
  
              if (valindex == -1) {
                  props.addError(NO_VALUE_FOR_KEY,
                                 s.substring(currentpair, nextpair).trim());
              } else {
                  String key = s.substring(currentpair, valindex).trim();
                  String value = s.substring(valindex + pairsep.length(),
                                             nextpair).trim();
  
                  if (type != null) {
                      key = type + "." + key;
                  }
  
                  props.setProperty(key, value);
              }
  
              if (nextpair == s.length()) {
                  break;
              }
  
              currentpair = nextpair + dlimiter.length();
          }
  
          return props;
      }
docs: Creates and populates a new HsqlProperties Object using a string
  such as "key1=value1;key2=value2". <p>
  
  The string that represents the = sign above is specified as pairsep
  and the one that represents the semicolon is specified as delimiter,
  allowing any string to be used for either.<p>
  
  Leading / trailing spaces around the keys and values are discarded.<p>
  
  The string is parsed by (1) subdividing into segments by delimiter
  (2) subdividing each segment in two by finding the first instance of
  the pairsep (3) trimming each pair of segments from step 2 and
  inserting into the properties object.<p>
  
  Each key is prefixed with the type argument and a dot before being
  inserted.<p>
  
  Any key without a value is added to the list of errors.