<commit_before>// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package fmt

/*
	f := fmt.New();
	print f.d(1234).s("\n").str();  // create string, print it
	f.d(-1234).s("\n").put();  // print string
	f.ud(^0).putnl();  // print string with automatic newline
*/

// export Fmt, New;

const NByte = 64;
const NPows10 = 160;

var ldigits string = "0123456789abcdef"  // var not const because we take its address
var udigits string = "0123456789ABCDEF"
var pows10 [NPows10] double;

func init() {
	pows10[0] = 1.0e0;
	pows10[1] = 1.0e1;
	for i:=2; i<NPows10; i++ {
		m := i/2;
		pows10[i] = pows10[m] * pows10[i-m];
	}
}

export type Fmt struct {
	buf string;
	wid int;
	wid_present bool;
	prec int;
	prec_present bool;
}

func (f *Fmt) clearflags() {
	f.wid_present = false;
	f.prec_present = false;
}

func (f *Fmt) clearbuf() {
	f.buf = "";
}

func (f *Fmt) init() {
	f.clearbuf();
	f.clearflags();
}

export func New() *Fmt {
	f := new(Fmt);
	f.init();
	return f;
}

func (f *Fmt) str() string {
	s := f.buf;
	f.clearbuf();
	f.clearflags();
	f.buf = "";
	return s;
}

func (f *Fmt) put() {
	print f.buf;
	f.clearbuf();
	f.clearflags();
}

func (f *Fmt) putnl() {
	print f.buf, "\n";
	f.clearbuf();
	f.clearflags();
}

func (f *Fmt) wp(w, p int) *Fmt {
	f.wid_present = true;
	f.wid = w;
	f.prec_present = true;
	f.prec = p;
	return f;
}

func (f *Fmt) p(p int) *Fmt {
	f.prec_present = true;
	f.prec = p;
	return f;
}

func (f *Fmt) w(x int) *Fmt {
	f.wid_present = true;
	f.wid = x;
	return f;
}

// append s to buf, padded on left (w > 0) or right (w < 0)<commit_msg>fix two print statements<commit_after>// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package fmt

/*
	f := fmt.New();
	print f.d(1234).s("\n").str();  // create string, print it
	f.d(-1234).s("\n").put();  // print string
	f.ud(^0).putnl();  // print string with automatic newline
*/

// export Fmt, New;

const NByte = 64;
const NPows10 = 160;

var ldigits string = "0123456789abcdef"  // var not const because we take its address
var udigits string = "0123456789ABCDEF"
var pows10 [NPows10] double;

func init() {
	pows10[0] = 1.0e0;
	pows10[1] = 1.0e1;
	for i:=2; i<NPows10; i++ {
		m := i/2;
		pows10[i] = pows10[m] * pows10[i-m];
	}
}

export type Fmt struct {
	buf string;
	wid int;
	wid_present bool;
	prec int;
	prec_present bool;
}

func (f *Fmt) clearflags() {
	f.wid_present = false;
	f.prec_present = false;
}

func (f *Fmt) clearbuf() {
	f.buf = "";
}

func (f *Fmt) init() {
	f.clearbuf();
	f.clearflags();
}

export func New() *Fmt {
	f := new(Fmt);
	f.init();
	return f;
}

func (f *Fmt) str() string {
	s := f.buf;
	f.clearbuf();
	f.clearflags();
	f.buf = "";
	return s;
}

func (f *Fmt) put() {
	print(f.buf);
	f.clearbuf();
	f.clearflags();
}

func (f *Fmt) putnl() {
	print(f.buf, "\n");
	f.clearbuf();
	f.clearflags();
}

func (f *Fmt) wp(w, p int) *Fmt {
	f.wid_present = true;
	f.wid = w;
	f.prec_present = true;
	f.prec = p;
	return f;
}

func (f *Fmt) p(p int) *Fmt {
	f.prec_present = true;
	f.prec = p;
	return f;
}

func (f *Fmt) w(x int) *Fmt {
	f.wid_present = true;
	f.wid = x;
	return f;
}

// append s to buf, padded on left (w > 0) or right (w < 0)
{'fraction_non_alphanumeric': 0.18300266508735563, 'fraction_numerical': 0.04027243115190998, 'mean_word_length': 3.079710144927536, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '2588209', 'n_tokens_mistral': 1578, 'n_tokens_neox': 1482, 'n_words': 432}