stringbuilder

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StringBuilder

type StringBuilder struct {
	// contains filtered or unexported fields
}

StringBuilder is a buffer for string

func New

func New() *StringBuilder

New create a new StringBuilder instance

func (*StringBuilder) Bytes

func (sb *StringBuilder) Bytes() []byte

Bytes returns a slice of length sb.Len()

func (*StringBuilder) Grow

func (sb *StringBuilder) Grow(n int)

Grow grows the buffer's capacity

func (*StringBuilder) Len

func (sb *StringBuilder) Len() int

Len returns the number of bytes in buffer

func (*StringBuilder) Reset

func (sb *StringBuilder) Reset()

Reset discards any buffered data

func (*StringBuilder) String

func (sb *StringBuilder) String() string

String returns the contents of buffer

func (*StringBuilder) Write

func (sb *StringBuilder) Write(s string)

Write appends the contents to the buffer

func (*StringBuilder) WriteByte

func (sb *StringBuilder) WriteByte(b byte)

Write writes the contents into the buffer.

func (*StringBuilder) WriteInt

func (sb *StringBuilder) WriteInt(n int)

WriteInt writes the contents into the buffer.

func (*StringBuilder) WriteInt64

func (sb *StringBuilder) WriteInt64(n int64)

WriteInt64 writes the contents into the buffer.

func (*StringBuilder) WriteRune

func (sb *StringBuilder) WriteRune(r rune)

WriteRune writes the contents into the buffer.

func (*StringBuilder) WriteTo

func (sb *StringBuilder) WriteTo(w io.Writer) (n int64, err error)

WriteTo implements the io.WriterTo interface.

func (*StringBuilder) WriteUint

func (sb *StringBuilder) WriteUint(n uint)

WriteUint writes the contents into the buffer.

func (*StringBuilder) WriteUint64

func (sb *StringBuilder) WriteUint64(n uint64)

WriteUint64 writes the contents into the buffer.

func (*StringBuilder) Writef

func (sb *StringBuilder) Writef(format string, arg ...interface{})

Writef appends the formatted contents to the buffer

func (*StringBuilder) Writeln

func (sb *StringBuilder) Writeln(s string)

Writeln appends the contents to the buffer, following a new line

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL