gt:             if (n6 != object.length()) {
context: /*
   * Decompiled with CFR 0_114.
   */
  package com.stimulsoft.lib.utils;
  
  import com.stimulsoft.lib.utils.StiDateUtil;
  import com.stimulsoft.lib.utils.StiValidationUtil;
  import java.util.ArrayList;
  import java.util.Collection;
  import java.util.Date;
  import java.util.List;
  
  /*
   * This class specifies class file version 49.0 but uses Java 6 signatures.  Assumed Java 6.
   */
  public class StiStringUtil {
      public static final String EMPTY = "";
      private static final String[] _currencyTextFormatCurrencySymbols = new String[]{"p.", "$", "\u20ac", "\u00a2", "\u00a3", "\u00a4", "\u00a5", "\u20a3", "\u20a4", "\u20a7", "\u20aa", "\u20ab", "\u0e3f", "\u20a0", "\u20a1", "\u20a2", "\u20a5", "\u20a6", "\u20a8", "\u20a9", "\u20ab"};
      public static final int INDEX_NOT_FOUND = -1;
  
      private StiStringUtil() {
      }
  
      public static String format(String string, Object object) {
          if (StiValidationUtil.isNotNullOrEmpty(string) && string.startsWith("{") && string.endsWith("}")) {
              String string2 = "";
              int n = 0;
              int n2 = 0;
              while (n < string.length()) {
                  if (string.charAt(n) == '{') {
                      while (string.charAt(n) == '{') {
                          ++n;
                      }
                      if (n - 1 > n2) {
                          string2 = string2 + string.substring(n2, n - 1);
                      }
                      n2 = n;
                      while (n < string.length() && string.charAt(n) != '}') {
                          ++n;
                      }
                      if (n > n2) {
                          string2 = string2 + StiStringUtil.parseFormatString(string.substring(n2, n), object);
                      }
                      n2 = ++n;
                      continue;
                  }
                  ++n;
              }
              if (n > n2) {
                  string2 = string2 + string.substring(n2, n);
              }
              return string2;
          }
          return String.format(string, object);
      }
  
      private static String parseFormatString(String string, Object object) {
          int n;
          for (n = 0; n < string.length() && Character.isDigit(string.charAt(n)); ++n) {
          }
          if (n > 0) {
              Character c = null;
              int n2 = -1;
              String string2 = null;
              if (n + 1 < string.length() && string.charAt(n) == ':') {
                  if (object instanceof Date) {
                      return StiDateUtil.format((Date)object, string.substring(n + 1));
                  }
                  c = Character.valueOf(string.charAt(n + 1));
                  string2 = string.substring(n + 1);
                  int n3 = n += 2;
                  while (n < string.length() && Character.isDigit(string.charAt(n))) {
                      ++n;
                  }
                  if (n > n3) {
                      n2 = Integer.parseInt(string.substring(n3, n), 10);
                  }
              }
              if (c == null) {
                  return object.toString();
              }
              if (string2.startsWith("dd")) {
                  return object == null ? "" : object.toString();
              }
              Double d = 0.0;
              try {
                  d = Double.parseDouble(object.toString());
              }
              catch (Exception var7_8) {
                  // empty catch block
              }
              switch (c.charValue()) {
                  case 'F': 
                  case 'f': {
                      return StiStringUtil.formatNumber(object, n2, false, true);
                  }
                  case 'N': 
                  case 'n': {
                      return StiStringUtil.formatNumber(object, n2, true, true);
                  }
                  case 'P': 
                  case 'p': {
                      return StiStringUtil.formatNumber(Double.parseDouble(object.toString()) * 100.0, n2, true, true) + "%";
                  }
                  case 'C': 
                  case 'c': {
                      return (d < 0.0 ? "-$" : "$") + StiStringUtil.formatNumber(object, n2, true, false);
                  }
                  case 'D': 
                  case 'd': {
                      return (d < 0.0 ? "-" : "") + StiStringUtil.padLeft(String.valueOf(Math.abs(d)), n2, "0");
                  }
                  case 'X': {
                      return StiStringUtil.padLeft(Long.toString(Long.parseLong(object.toString()), 16).toUpperCase(), n2, "0");
                  }
                  case 'x': {
                      return StiStringUtil.padLeft(Long.toString(Long.parseLong(object.toString()), 16).toLowerCase(), n2, "0");
                  }
              }
              if (string2.indexOf("#") != -1) {
                  return StiStringUtil.customFormat(object, string2);
              }
              return object.toString();
          }
          return "";
      }
  
      private static String customFormat(Object object, String string) {
          if (string == null || string.length() == 0) {
              return object.toString();
          }
          if (object instanceof Double || object instanceof Long || object instanceof Byte || object instanceof Float || object instanceof Integer || object instanceof Byte) {
              return StiStringUtil.customFormatNumber(Double.parseDouble(object.toString()), string);
          }
          return object.toString();
      }
  
      private static String customFormatNumber(Double d, String string) {
          Object object;
          String string2 = ".";
          Object object2 = Character.valueOf(' ');
          String string3 = "";
          String string4 = "";
          String string5 = "";
          String string6 = "";
          Boolean bl = false;
          int n = -1;
          int n2 = 0;
          for (String string7 : _currencyTextFormatCurrencySymbols) {
              if (string.startsWith(string7)) {
                  string3 = string7;
              }
              if (!string.startsWith(string7)) continue;
              string4 = string7;
          }
          for (n2 = 0; n2 < string.length(); ++n2) {
              Character c = Character.valueOf(string.charAt(n2));
              if (c.charValue() == '.') {
                  bl = true;
                  continue;
              }
              if (c.charValue() == '0' || c.charValue() == '#') {
                  if (bl.booleanValue()) {
                      string6 = string6 + c;
                      continue;
                  }
                  string5 = string5 + c;
                  continue;
              }
              if (bl.booleanValue()) continue;
              object2 = c;
              n = string5.length();
          }
          if (string6.length() == 0 && string5.length() == 0) {
              return string;
          }
          int n3 = 0;
          if (n != -1) {
              n3 = string5.length() - n;
          }
          int n4 = string6.length();
          int n5 = string6.lastIndexOf("0") + 1;
          int n6 = string5.indexOf("0");
          int n7 = n6 == -1 ? 0 : string5.length() - n6;
          Object object3 = "";
          Boolean bl2 = d < 0.0;
          Double d2 = Math.abs(d);
          Integer n8 = d2.intValue();
          double d3 = Math.pow(10.0, n4);
          Long l = Math.round(StiStringUtil.round(d2 - (double)n8.intValue(), Double.valueOf(n4)) * d3);
          if ((double)l.longValue() >= d3) {
              object = n8;
              Integer n9 = n8 = Integer.valueOf(n8 + 1);
              l = 0;
          }
          if ((object = n8.toString()).length() < n7) {
              object = StiStringUtil.repeatString("0", n7 - object.length()) + (String)object;
          }
          if (n8 != 0 || n7 > 0) {
              if (n3 > 0) {
                  for (n2 = object.length() - n3; n2 >= 0; n2 -= n3) {
                      object3 = (n2 > 0 ? object2 : "") + object.substring(n2, n2 + n3) + (String)object3;
                  }
                  if (n2 < 0) {
                      object3 = object.substring(0, n2 + n3) + (String)object3;
                  }
              } else {
                  object3 = object;
              }
          }
          if (n4 > 0) {
              object = l.toString();
              for (n6 = object.length(); n6 > n5 && object.charAt(n6 - 1) == '0'; --n6) {
              }
  