1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Import: Expand index on temp category table to include cl_type

This commit is contained in:
gnosygnu
2016-11-27 19:13:12 -05:00
parent 9e1bbe0235
commit 12459429b4
5 changed files with 19 additions and 17 deletions

View File

@@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx;
import gplx.core.errs.*;
public class Err extends RuntimeException {
private final boolean is_gplx;
private final String trace;
private final boolean is_gplx;
private final String trace;
private Err_msg[] msgs_ary = new Err_msg[8]; private int msgs_len = 8, msgs_idx = 0;
public Err(boolean is_gplx, String trace, String type, String msg, Object... args) {
this.is_gplx = is_gplx;

View File

@@ -19,6 +19,17 @@ package gplx;
import java.lang.*;
import gplx.core.strings.*; import gplx.langs.gfs.*; import gplx.core.envs.*;
public class String_ implements Gfo_invk {
public static int Len(String s) {return s.length();}
public static char CharAt(String s, int i) {return s.charAt(i);}
public static String new_u8(byte[] v, int bgn, int end) {
try {
return v == null
? null
: new String(v, bgn, end - bgn, "UTF-8");
}
catch (Exception e) {Err_.Noop(e); throw Err_.new_("core", "unsupported encoding", "bgn", bgn, "end", end);}
}
public static final Class<?> Cls_ref_type = String.class;
public static final String Cls_val_name = "str" + "ing";
public static final int Find_none = -1, Pos_neg1 = -1;
@@ -35,14 +46,6 @@ public class String_ implements Gfo_invk {
catch (Exception e) {throw Err_.new_exc(e, "core", "unsupported encoding");}
}
public static String new_u8(byte[] v) {return v == null ? null : new_u8(v, 0, v.length);}
public static String new_u8(byte[] v, int bgn, int end) {
try {
return v == null
? null
: new String(v, bgn, end - bgn, "UTF-8");
}
catch (Exception e) {Err_.Noop(e); throw Err_.new_("core", "unsupported encoding", "bgn", bgn, "end", end);}
}
public static String new_u8__by_len(byte[] v, int bgn, int len) {
int v_len = v.length;
if (bgn + len > v_len) len = v_len - bgn;
@@ -68,7 +71,6 @@ public class String_ implements Gfo_invk {
}
public static boolean Len_gt_0(String s) {return s != null && s.length() > 0;}
public static boolean Len_eq_0(String s) {return s == null || s.length() == 0;}
public static int Len(String s) {return s.length();}
public static String Lower(String s) {return s.toLowerCase();}
public static String Upper(String s) {return s.toUpperCase();}
public static String CaseNormalize(boolean caseSensitive, String s) {return caseSensitive ? s : String_.Lower(s);}
@@ -76,7 +78,6 @@ public class String_ implements Gfo_invk {
public static String Mid(String s, int bgn) {return s.substring(bgn);}
public static String Replace(String s, String find, String replace) {return s.replace(find, replace);}
public static char[] XtoCharAry(String s) {return s.toCharArray();}
public static char CharAt(String s, int i) {return s.charAt(i);}
public static int CodePointAt(String s, int i) {return s.codePointAt(i);}
public static boolean Has(String s, String find) {return s.indexOf(find) != String_.Find_none;}
public static boolean Has_at_bgn(String s, String v) {return s.startsWith(v);}