code: function (str, sep, eq) {
              if (typeof str != 'string' || !(str = S.trim(str))) {
                  return {};
              }
              sep = sep || SEP;
              eq = eq || EQ;
              var ret = {},
                  eqIndex,
                  decode = S.urlDecode,
                  pairs = str.split(sep),
                  key, val,
                  i = 0, len = pairs.length;
  
              for (; i < len; ++i) {
                  eqIndex = pairs[i].indexOf(eq);
                  if (eqIndex == -1) {
                      key = decode(pairs[i]);
                      val = undefined;
                  } else {
                      // remember to decode key!
                      key = decode(pairs[i].substring(0, eqIndex));
                      val = pairs[i].substring(eqIndex + 1);
                      try {
                          val = decode(val);
                      } catch (e) {
                          logger.error('decodeURIComponent error : ' + val);
                          logger.error(e);
                      }
                      if (S.endsWith(key, '[]')) {
                          key = key.substring(0, key.length - 2);
                      }
                  }
                  if (key in ret) {
                      if (S.isArray(ret[key])) {
                          ret[key].push(val);
                      } else {
                          ret[key] = [ret[key], val];
                      }
                  } else {
                      ret[key] = val;
                  }
              }
              return ret;
          }
docs: Parses a URI-like query string and returns an object composed of parameter/value pairs.
  
  for example:
  @example
  'section=blog&id=45'        // -> {section: 'blog', id: '45'}
  'section=blog&tag=js&tag=doc' // -> {section: 'blog', tag: ['js', 'doc']}
  'tag=ruby%20on%20rails'        // -> {tag: 'ruby on rails'}
  'id=45&raw'        // -> {id: '45', raw: ''}
  @param {String} str param string
  @param {String} [sep='&'] separator between each pair of data
  @param {String} [eq='='] separator between key and value of data
  @return {Object} json data
  @member KISSY