mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.11.1.1
This commit is contained in:
@@ -29,7 +29,7 @@ public class Xoa_gfs_bldr {
|
||||
int ary_len = ary.length;
|
||||
for (int i = 0; i < ary_len; i++) {
|
||||
if (i != 0 || cont) bfr.Add_byte(Byte_ascii.Dot);
|
||||
bfr.Add_str(ary[i]);
|
||||
bfr.Add_str_u8(ary[i]);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class Xoa_gfs_bldr {
|
||||
public Xoa_gfs_bldr Add_quote_0() {bfr.Add_byte(Byte_ascii.Apos); return this;}
|
||||
public Xoa_gfs_bldr Add_term_nl() {bfr.Add(Bry_semic_nl); return this;}
|
||||
public Xoa_gfs_bldr Add_eq_str(String k, byte[] v) {
|
||||
bfr.Add_str(k);
|
||||
bfr.Add_str_u8(k);
|
||||
bfr.Add(Bry_eq);
|
||||
bfr.Add_byte_apos();
|
||||
bfr.Add(v);
|
||||
|
||||
@@ -19,7 +19,7 @@ package gplx.xowa.apps.gfs; import gplx.*; import gplx.xowa.*; import gplx.xowa.
|
||||
public class Xoa_gfs_wtr_ {
|
||||
public static byte[] Escape(String v) {return Escape(Bry_.new_u8(v));}
|
||||
public static byte[] Escape(byte[] v) {
|
||||
return Bry_find_.Find_fwd(v, Byte_ascii.Apos) == Bry_.NotFound ? v : Bry_.Replace(v, Byte_ascii.Apos_bry, Bry__apos_escaped);
|
||||
return Bry_find_.Find_fwd(v, Byte_ascii.Apos) == Bry_find_.Not_found ? v : Bry_.Replace(v, Byte_ascii.Apos_bry, Bry__apos_escaped);
|
||||
} private static final byte[] Bry__apos_escaped = Bry_.new_a7("''");
|
||||
public static void Write_prop(Bry_bfr bfr, byte[] prop, byte[] val) {
|
||||
bfr.Add(prop).Add(Bry__val_bgn).Add(Xoa_gfs_wtr_.Escape(val)).Add(Bry__val_end); // EX: "a_('b');\n"
|
||||
@@ -29,7 +29,7 @@ public class Xoa_gfs_wtr_ {
|
||||
int len = ary.length;
|
||||
for (int i = 0; i < len; ++i) {
|
||||
if (i != 0) bfr.Add_byte(Byte_ascii.Dot);
|
||||
bfr.Add_str(ary[i]);
|
||||
bfr.Add_str_u8(ary[i]);
|
||||
}
|
||||
return bfr.To_str_and_rls();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user