Beispiel #1
0
 @gplx.Virtual
 public byte[] Commafy(byte[] num_bry) {
   if (num_bry == null) return Bry_.Empty; // MW: if ( $number === null ) return '';
   if (num_grp_fmtr.Mode_is_regx()) return num_grp_fmtr.Fmt_regx(tmp_bfr, num_bry);
   else // NOTE: for now, return same as ###,###,###; only affects 12 languages; current
        // implementation is bad; https://bugzilla.wikimedia.org/show_bug.cgi?id=63977
   return num_grp_fmtr.Fmt_regx(tmp_bfr, num_bry);
 }
Beispiel #2
0
 public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
   if (ctx.Match(k, Invk_clear)) this.Clear();
   else if (ctx.Match(k, Invk_separators)) return separators_mgr;
   else if (ctx.Match(k, Invk_digits)) {
     digits_translate = true;
     return digits_mgr;
   } // NOTE: only langes with a digit_transform_table will call digits; DATE:2014-05-28
   else if (ctx.Match(k, Invk_digit_grouping_pattern))
     return String_.new_u8(num_grp_fmtr.Digit_grouping_pattern());
   else if (ctx.Match(k, Invk_digit_grouping_pattern_))
     num_grp_fmtr.Digit_grouping_pattern_(m.ReadBry("v"));
   else return Gfo_invk_.Rv_unhandled;
   return this;
 }
Beispiel #3
0
 public Xol_num_mgr Clear() {
   digits_mgr.Clear();
   separators_mgr.Clear();
   num_grp_fmtr.Clear();
   return this;
 }