-
Notifications
You must be signed in to change notification settings - Fork 0
/
stringbuilder_append.go
54 lines (43 loc) · 1.98 KB
/
stringbuilder_append.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package stringutils
import "strconv"
// WriteInt appends the string form of the integer i, as generated by FormatInt.
func (sb *Builder) WriteInt(i int64, base int) {
sb.data = strconv.AppendInt(sb.data, i, base)
}
// WriteUint appends the string form of the unsigned integer i, as generated by FormatUint.
func (sb *Builder) WriteUint(i uint64, base int) {
sb.data = strconv.AppendUint(sb.data, i, base)
}
// WriteFloat appends the string form of the floating-point number f,
// as generated by FormatFloat.
func (sb *Builder) WriteFloat(f float64, fmt byte, prec, bitSize int) {
sb.data = strconv.AppendFloat(sb.data, f, fmt, prec, bitSize)
}
// WriteBool appends the string form of the bool v, as generated by FormatBool.
func (sb *Builder) WriteBool(v bool) {
sb.data = strconv.AppendBool(sb.data, v)
}
// WriteQuote appends the string form of the quoted string s, as generated by Quote.
func (sb *Builder) WriteQuote(s string) {
sb.data = strconv.AppendQuote(sb.data, s)
}
// WriteQuoteRune appends the string form of the quoted rune r, as generated by QuoteRune.
func (sb *Builder) WriteQuoteRune(r rune) {
sb.data = strconv.AppendQuoteRune(sb.data, r)
}
// WriteQuoteRuneToASCII appends the string form of the single-quoted rune r, as generated by QuoteRuneToASCII.
func (sb *Builder) WriteQuoteRuneToASCII(r rune) {
sb.data = strconv.AppendQuoteRuneToASCII(sb.data, r)
}
// WriteQuoteToASCII appends the string form of the single-quoted string s, as generated by QuoteToASCII.
func (sb *Builder) WriteQuoteToASCII(s string) {
sb.data = strconv.AppendQuoteToASCII(sb.data, s)
}
// WriteQuoteRuneToGraphic appends the string form of the quoted rune r, as generated by QuoteRuneToGraphic.
func (sb *Builder) WriteQuoteRuneToGraphic(r rune) {
sb.data = strconv.AppendQuoteRuneToGraphic(sb.data, r)
}
// WriteQuoteToGraphic appends the string form of the quoted string s, as generated by QuoteToGraphic.
func (sb *Builder) WriteQuoteToGraphic(s string) {
sb.data = strconv.AppendQuoteToGraphic(sb.data, s)
}