static bool getHtmlTagParameters_debug; // tag is CNC of the whole container tag static S xml_getArg(L tag, S name) { ret xml_getArg(get(tag, 1), name); } // s is just the tag from < to > static S xml_getArg(S s, S name) { int i = indexOf(s, ' '); if (i < 0) null; while true { while (" \t".indexOf(charAt(s, i)) >= 0) ++i; int j = indexOfAny(s, i, " \t>/"); if (j <= i) null; int eq = indexOf(s, '=', i); S key = eq < 0 ? substring(s, i, j) : substring(s, i, eq); if (eqic(key, name)) ret eq < 0 ? key : htmlUnquote(substring(s, eq+1, j)); i = j; } }