<commit_before>#pragma once

#include <cassert>
#include <cstring>
#include <ostream>
#include <sstream>
#include <string>

#include "fixfmt/base.hh"
#include "fixfmt/math.hh"
#include "fixfmt/text.hh"

//------------------------------------------------------------------------------

namespace fixfmt {

using std::string;

class Number
{
public:

  constexpr static char PAD_SPACE      = ' ';
  constexpr static char PAD_ZERO       = '0';

  constexpr static char SIGN_NONE      = ' ';
  constexpr static char SIGN_NEGATIVE  = '-';
  constexpr static char SIGN_ALWAYS    = '+';

  constexpr static int  PRECISION_NONE = -1;

  /*
   * Arguments to a number formatter.
   */
  struct Args
  {
    int      size           = 8;
    int      precision      = PRECISION_NONE;
    char     sign           = SIGN_NEGATIVE;
    char     pad            = ' ';
    char     point          = '.';
    char     bad            = '#';
    string   nan            = "NaN";
    string   inf            = "inf";
  };
  
  Number()                              = default;
  Number(Number const&)                 = default;
  Number(Number&&) noexcept             = default;
  Number& operator=(Number const&)      = default;
  Number& operator=(Number&&) noexcept  = default;
  ~Number() noexcept                    = default;

  Number(Args const& args) 
    : args_(args) { check(args_); set_up(); }
  Number(Args&& args) 
    : args_(std::move(args)) { check(args_); set_up(); }<commit_msg>Whitespace.<commit_after>#pragma once

#include <cassert>
#include <cstring>
#include <ostream>
#include <sstream>
#include <string>

#include "fixfmt/base.hh"
#include "fixfmt/math.hh"
#include "fixfmt/text.hh"

//------------------------------------------------------------------------------

namespace fixfmt {

using std::string;

class Number
{
public:

  constexpr static char PAD_SPACE      = ' ';
  constexpr static char PAD_ZERO       = '0';

  constexpr static char SIGN_NONE      = ' ';
  constexpr static char SIGN_NEGATIVE  = '-';
  constexpr static char SIGN_ALWAYS    = '+';

  constexpr static int  PRECISION_NONE = -1;

  /*
   * Arguments to a number formatter.
   */
  struct Args
  {
    int     size            = 8;
    int     precision       = PRECISION_NONE;
    char    sign            = SIGN_NEGATIVE;
    char    pad             = ' ';
    char    point           = '.';
    char    bad             = '#';
    string  nan             = "NaN";
    string  inf             = "inf";
  };
  
  Number()                              = default;
  Number(Number const&)                 = default;
  Number(Number&&) noexcept             = default;
  Number& operator=(Number const&)      = default;
  Number& operator=(Number&&) noexcept  = default;
  ~Number() noexcept                    = default;

  Number(Args const& args) 
    : args_(args) { check(args_); set_up(); }
  Number(Args&& args) 
    : args_(std::move(args)) { check(args_); set_up(); }
{'fraction_non_alphanumeric': 0.16971544715447154, 'fraction_numerical': 0.0020325203252032522, 'mean_word_length': 1.6651624548736461, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '768225', 'n_tokens_mistral': 911, 'n_tokens_neox': 888, 'n_words': 218}