private String trim (String name) { if (isBeginName (name) || isInsideName (name)) return (name.substring (2)); else return name; }
private String trim (String name) { if (isBeginName (name) || isInsideName (name)) return (name.substring (2)); else return name; }
private String trim (String name) { if (isBeginName (name) || isInsideName (name)) return (name.substring (2)); else return name; }
private int compareSplitTags (String[] thisTagSplit, String[] lastTagSplit) { int idx = lastTagSplit.length - 1; for (; idx >= 0; idx--) { if (idx >= thisTagSplit.length) continue; String thisTag = thisTagSplit [idx]; if (isBeginName (thisTag)) continue; if (matches (lastTagSplit [idx], thisTag)) break; } int numToClose = lastTagSplit.length - idx - 1; // sanity check while (idx >= 0) { if (!matches (thisTagSplit[idx], lastTagSplit [idx])) { throw new IllegalArgumentException ("Tags don't match."); } idx--; } return numToClose; }
private int compareSplitTags (String[] thisTagSplit, String[] lastTagSplit) { int idx = lastTagSplit.length - 1; for (; idx >= 0; idx--) { if (idx >= thisTagSplit.length) continue; String thisTag = thisTagSplit [idx]; if (isBeginName (thisTag)) continue; if (matches (lastTagSplit [idx], thisTag)) break; } int numToClose = lastTagSplit.length - idx - 1; // sanity check while (idx >= 0) { if (!matches (thisTagSplit[idx], lastTagSplit [idx])) { throw new IllegalArgumentException ("Tags don't match."); } idx--; } return numToClose; }
private int compareSplitTags (String[] thisTagSplit, String[] lastTagSplit) { int idx = lastTagSplit.length - 1; for (; idx >= 0; idx--) { if (idx >= thisTagSplit.length) continue; String thisTag = thisTagSplit [idx]; if (isBeginName (thisTag)) continue; if (matches (lastTagSplit [idx], thisTag)) break; } int numToClose = lastTagSplit.length - idx - 1; // sanity check while (idx >= 0) { if (!matches (thisTagSplit[idx], lastTagSplit [idx])) { throw new IllegalArgumentException ("Tags don't match."); } idx--; } return numToClose; }