cdm/src/main/java/ucar/nc2/iosp/grads/GradsAttribute.java
public static GradsAttribute parseAttribute(String attrSpec) {
        String[]     toks = attrSpec.split("\\s+");
        StringBuffer buf  = new StringBuffer();
        for (int i = 4; i < toks.length; i++) {
            buf.append(toks[i]);
            buf.append(" ");
        }

        // toks[0] is "@"
        return new GradsAttribute(toks[1], toks[2], toks[3],
                                  buf.toString().trim());
    }
public static GradsAttribute parseAttribute(String attrSpec) {
        String[]     toks = attrSpec.split("\\s+");
        StringBuffer buf  = new StringBuffer();
        for (int i = 4; i < toks.length; i++) {
            buf.append(toks[i]);
            buf.append(" ");
        }

        // toks[0] is "@"
        return new GradsAttribute(toks[1], toks[2], toks[3],
                                  buf.toString().trim());
    }
public static GradsAttribute parseAttribute ( String attrSpec ) { String [ ] toks = attrSpec . split ( "\\s+" ) ; StringBuffer buf = new StringBuffer ( ) ; for ( int i = 4 ; i < toks . length ; i ++ ) { buf . append ( toks [ i ] ) ; buf . append ( " " ) ; } // toks[0] is "@" return new GradsAttribute ( toks [ 1 ] , toks [ 2 ] , toks [ 3 ] , buf . toString ( ) . trim ( ) ) ; }
Parse an attribute spec

@param attrSpec  the attribute spec (e.g. @ precip String units mm/day)

@return the associated attribute
Parse an attribute spec