class TextTable {

  public static int realDataLen(Object data) {
    if (data == null) {
      return 0;
    }
    String dataString = data.toString();
    int totalLength = dataString.length();
    Matcher matcher = METADATA_PATTERN.matcher(dataString);
    while (matcher.find()) {
      String withMeta = matcher.group(1);
      String justData = matcher.group(2);
      int metaLegth = withMeta.length() - justData.length();
      totalLength -= metaLegth;
    }
    return totalLength;
  }

}