mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.4.3.1'
This commit is contained in:
@@ -265,6 +265,12 @@ public class Bry_ {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public static boolean Has_at_end(byte[] src, byte lkp) {
|
||||
if (src == null) return false;
|
||||
int src_len = src.length;
|
||||
if (src_len == 0) return false;
|
||||
return src[src_len - 1] == lkp;
|
||||
}
|
||||
public static boolean Has_at_end(byte[] src, byte[] lkp) {int src_len = src.length; return Has_at_end(src, lkp, src_len - lkp.length, src_len);}
|
||||
public static boolean Has_at_end(byte[] src, byte[] lkp, int src_bgn, int src_end) {
|
||||
int lkp_len = lkp.length;
|
||||
@@ -585,6 +591,9 @@ public class Bry_ {
|
||||
else if (b2 != 0) return new byte[] {b2, b3};
|
||||
else return new byte[] {b3};
|
||||
}
|
||||
public static boolean To_bool_or(byte[] raw, boolean or) {
|
||||
return Bry_.Eq(raw, Bool_.True_bry) ? true : or;
|
||||
}
|
||||
public static boolean To_bool_by_int(byte[] ary) {
|
||||
int rv = To_int_or(ary, 0, ary.length, Int_.Min_value, Bool_.Y, null);
|
||||
switch (rv) {
|
||||
|
||||
@@ -21,8 +21,8 @@ public interface GfoInvkAble {
|
||||
}
|
||||
/*
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_set)) {}
|
||||
if (ctx.Match(k, Invk__set)) {}
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
return this;
|
||||
} private static final String Invk_set = "set";
|
||||
} private static final String Invk__set = "set";
|
||||
*/
|
||||
|
||||
@@ -138,9 +138,9 @@ public class Tfds { // URL:doc/gplx.tfds/Tfds.txt
|
||||
public static void Err_has(Exception e, String hdr) {
|
||||
Tfds.Eq_true(String_.Has(Err_.Message_gplx_full(e), hdr), "could not find '{0}' in '{1}'", hdr, Err_.Message_gplx_full(e));
|
||||
}
|
||||
static final String EmptyStr = TfdsMsgBldr.EmptyStr;
|
||||
static final String EmptyStr = TfdsMsgBldr.EmptyStr;
|
||||
static TfdsMsgBldr msgBldr = TfdsMsgBldr.new_();
|
||||
public static final Io_url RscDir = Io_url_.Usr().GenSubDir_nest("000", "200_dev", "190_tst");
|
||||
public static final Io_url RscDir = Io_url_.Usr().GenSubDir_nest("000", "200_dev", "190_tst");
|
||||
public static DateAdp Now_time0_add_min(int minutes) {return time0.Add_minute(minutes);}
|
||||
@gplx.Internal protected static boolean Now_enabled() {return now_enabled;} private static boolean now_enabled; private static boolean now_freeze;
|
||||
public static void Now_enabled_n_() {now_enabled = false; now_freeze = false;}
|
||||
@@ -152,7 +152,7 @@ public class Tfds { // URL:doc/gplx.tfds/Tfds.txt
|
||||
if (!now_freeze) nowTime = rv.Add_minute(1);
|
||||
return rv;
|
||||
}
|
||||
private static final DateAdp time0 = DateAdp_.parse_gplx("2001-01-01 00:00:00.000");
|
||||
private static final DateAdp time0 = DateAdp_.parse_gplx("2001-01-01 00:00:00.000");
|
||||
private static DateAdp nowTime; // NOTE: cannot set to time0 due to static initialization;
|
||||
public static void WriteText(String text) {Console_adp__sys.Instance.Write_str(text);}
|
||||
public static void Write(byte[] s, int b, int e) {Write(Bry_.Mid(s, b, e));}
|
||||
@@ -170,7 +170,7 @@ class TfdsEqListItmStr_cls_default implements TfdsEqListItmStr {
|
||||
public String To_str(Object cur, Object actl) {
|
||||
return Object_.Xto_str_strict_or_null_mark(cur);
|
||||
}
|
||||
public static final TfdsEqListItmStr_cls_default Instance = new TfdsEqListItmStr_cls_default(); TfdsEqListItmStr_cls_default() {}
|
||||
public static final TfdsEqListItmStr_cls_default Instance = new TfdsEqListItmStr_cls_default(); TfdsEqListItmStr_cls_default() {}
|
||||
}
|
||||
class TfdsEqAryItm {
|
||||
public int Idx() {return idx;} public TfdsEqAryItm Idx_(int v) {idx = v; return this;} int idx;
|
||||
@@ -244,5 +244,5 @@ class TfdsMsgBldr {
|
||||
);
|
||||
}
|
||||
public static TfdsMsgBldr new_() {return new TfdsMsgBldr();} TfdsMsgBldr() {}
|
||||
public static final String EmptyStr = "";
|
||||
public static final String EmptyStr = "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user