mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Mw_parse.Prepro: Support heading and onlyinclude
This commit is contained in:
@@ -159,7 +159,7 @@ public class Bry_find_ {
|
||||
return Bry_find_.Not_found;
|
||||
}
|
||||
public static int Find_bwd__while_space_or_tab(byte[] src, int cur, int end) { // get pos of 1st char that is not \t or \s
|
||||
if (cur < 0 || cur >= src.length) return Bry_find_.Not_found;
|
||||
if (cur < 0 || cur > src.length) return Bry_find_.Not_found;
|
||||
for (int i = cur - 1; i >= end; i--) {
|
||||
byte b = src[i];
|
||||
switch (b) {
|
||||
|
||||
@@ -19,6 +19,7 @@ package gplx;
|
||||
import gplx.core.lists.*; /*EnumerAble,ComparerAble*/
|
||||
public interface Ordered_hash extends Hash_adp, List_adp__getable {
|
||||
void Add_at(int i, Object o);
|
||||
Ordered_hash Add_many_str(String... ary);
|
||||
int Idx_of(Object item);
|
||||
void Sort();
|
||||
void Sort_by(ComparerAble comparer);
|
||||
|
||||
@@ -54,6 +54,15 @@ public class Ordered_hash_base extends Hash_adp_base implements Ordered_hash, Gf
|
||||
ordered.Add_at(i, val);
|
||||
AssertCounts();
|
||||
}
|
||||
public Ordered_hash Add_many_str(String... ary) {
|
||||
int ary_len = ary.length;
|
||||
for (int i = 0; i < ary_len; i++) {
|
||||
String itm = ary[i];
|
||||
byte[] bry = Bry_.new_u8(itm);
|
||||
this.Add(bry, bry);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
void AssertCounts() {
|
||||
if (super.Count() != ordered.Count()) throw Err_.new_wo_type("counts do not match", "hash", super.Count(), "list", ordered.Count());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user