将带有-符号的属性去掉，换成下一个字母为大写
@param attr
160803
private String convertAttr(String attr){
		char[] cs = attr.toCharArray();
		StringBuilder sb = new StringBuilder(cs.length);
		boolean upper = false;
		for(int i=0;i<cs.length;i++){
			if(upper){
				if(cs[i]=='-'){
					continue;
				}
				sb.append(Character.toUpperCase(cs[i]));
				upper=false;
				
				
			}else{
				if(cs[i]=='-'){
					upper=true;
				}else{
					sb.append(cs[i]);
				}
			}
			
			
		}
		return sb.toString();
	}
1242472
public Integer getInt(String attr) {
		Number n = (Number)attrs.get(attr);
		return n != null ? n.intValue() : null;
	}
782223
public function set_cfg($attr){
    if ( null !== $this->cfg ){
      $args = \func_get_args();
      if ( (\count($args) === 2) && \is_string($attr) ){
        /** @var array $attr */
        $attr = [$args[0] => $args[1]];
      }
      foreach ( $attr as $key => $val ){
        if ( \is_string($key) ){
          $this->cfg[$key] = $val;
        }
      }
      $this->set_session(['cfg' => $this->cfg]);
    }
    return $this;
  }
1161769
public void setAttribute(String attrname, String value) {
        if (attributes == null)
            attributes = new ArrayList<Attribute>();
        Attribute.setAttribute(attributes, attrname, value);
    }
101587
public boolean contains(Attribute attr) throws NamingException {
    if (attr == null) {
      return false; // protect
    }

    Attribute recAttr = getAttributes().get(attr.getID());

    if (recAttr == null) {
      return false;
    }

    NamingEnumeration ne = attr.getAll();

    while (ne.hasMore()) {
      if (!recAttr.contains(ne.next())) {
        return false;
      }
    }

    return true;
  }
468815
public static boolean inAttributes(String attrName, Attributes attrs) {
        for (NamingEnumeration<String> neu = attrs.getIDs(); neu.hasMoreElements();) {
            String attrId = neu.nextElement();
            if (attrId.equalsIgnoreCase(attrName)) {
                return true;
            }
        }
        return false;
    }
1116294
function parseAttributes(attrStr) {
    var reAttributes = /([^=<>\"\'\s]+)\s*(?:=\s*["']?([^"']*)["']?)?/g;
    var result = {};
    var match;

    if (attrStr) {
        while (match = reAttributes.exec(attrStr)) {
            result[match[1]] = match[2] || true;
        }
    }

    return result;
}
1328697
function (attr) {
            var value = typeof attr === 'string' && !! ~attr.indexOf('.') && this.__get(attr);
            if (value) {
                return value;
            }

            // break up the attr (`"foo.bar"`) into `["foo","bar"]`
            var parts = attrParts(attr),
                // get the value of the first attr name (`"foo"`)
                current = this.__get(parts.shift());
            // if there are other attributes to read
            return parts.length ?
            // and current has a value
            current ?
            // lookup the remaining attrs on current
            current._get(parts) :
            // or if there's no current, return undefined
            undefined :
            // if there are no more parts, return current
            current;
        }
976009
public String getStr(String attr) {
		// return (String)attrs.get(attr);
		Object s = attrs.get(attr);
		return s != null ? s.toString() : null;
	}
1225730
function(elem, attr) {
		// for each attributeName
		for (var name in attr) {
			if (attr.hasOwnProperty(name)) {
				// attributes
				elem.setAttribute(name, attr[name]);
			}
		}
		return elem;
	}
1177233
public void addAttribute(Attribute attr) {
        if (attr instanceof SourceFileAttr) {
            if (mSource != null) {
                mAttributes.remove(mSource);
            }
            mSource = (SourceFileAttr)attr;
        }
        else if (attr instanceof InnerClassesAttr) {
            if (mInnerClassesAttr != null) {
                mAttributes.remove(mInnerClassesAttr);
            }
            mInnerClassesAttr = (InnerClassesAttr)attr;
        }

        mAttributes.add(attr);
    }
1300007
public function attr($attr)
    {
        $data = [];

        foreach ($this->_nodes as $node) {
            $data[] = $node->getAttribute($attr);
        }

        return $data;
    }
425291
public void addArgAttrs(List<Attribute> next) {
        int i;
        int max;
        Attribute attr;

        max = getArgCount();
        for (i = 0; i < max; i++) {
            attr = getArgAttribute(i);
            if (next.indexOf(attr) == -1) {
                next.add(attr);
            }
        }
    }
791172
public java.sql.Time getTime(String attr) {
		return (java.sql.Time)attrs.get(attr);
	}
1132234
private Attr[] sortAttributes(NamedNodeMap attrs) {

        int len = (attrs != null) ? attrs.getLength() : 0;
        Attr[] array = new Attr[len];
        for (int i = 0; i < len; i++) {
            array[i] = (Attr) attrs.item(i);
        }
        for (int i = 0; i < len - 1; i++) {
            String name = array[i].getNodeName();
            int index = i;
            for (int j = i + 1; j < len; j++) {
                String curName = array[j].getNodeName();
                if (curName.compareTo(name) < 0) {
                    name = curName;
                    index = j;
                }
            }
            if (index != i) {
                Attr temp = array[i];
                array[i] = array[index];
                array[index] = temp;
            }
        }
        return (array);
    }
1216039
private static Map<String, String> parseAttributes(String attrString) throws ParseException {

      AttributeString str = new AttributeString(attrString);
      Map<String, String> attributes = Maps.newLinkedHashMapWithExpectedSize(4); //Preserve order...
      AttrState state = AttrState.NAME;
      String currName = "";
      String currString = "";
      int currPos = 0;
      while((currString = str.nextString()) != null) {
         switch(state) {
            case NAME:
               if(str.ch == '=') {
                  currName = currString;
                  state = AttrState.VALUE;
               } else {
                  attributes.put(String.format("$%d", currPos++), currString);
               }
               break;
            case VALUE:
               attributes.put(currName.toLowerCase(), currString);
               state = AttrState.NAME;
               break;
         }
      }
      return attributes;
   }
425020
private static function getAttributes($attr)
    {
        $html = "";
        foreach ($attr as $key => $value) {
            $html .= $key . '="' . $value . '" ';
        }

        return $html;
    }