Documentation
¶
Index ¶
- type StringBuilder
- func (s *StringBuilder) Append(text string)
- func (s *StringBuilder) AppendLine(text string)
- func (s *StringBuilder) AppendRune(char rune)
- func (s *StringBuilder) Insert(index int, text string) error
- func (s *StringBuilder) Len() int
- func (s *StringBuilder) Remove(start int, length int) error
- func (s *StringBuilder) ToString() string
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
}
func NewFromString ¶
func NewFromString(text string) *StringBuilder
Creates a new instance of the StringBuilder with a preallocated text
func NewStringBuilder ¶
func NewStringBuilder(initialCapacity int) *StringBuilder
Creates a new instance of the StringBuilder with preallocated array
func (*StringBuilder) Append ¶
func (s *StringBuilder) Append(text string)
Appends a text to the StringBuilder instance
func (*StringBuilder) AppendLine ¶
func (s *StringBuilder) AppendLine(text string)
Appends a text and a new line character to the StringBuilder instance
func (*StringBuilder) AppendRune ¶
func (s *StringBuilder) AppendRune(char rune)
Appends a single character to the StringBuilder instance
func (*StringBuilder) Len ¶
func (s *StringBuilder) Len() int
Returns the current length of the represented string
func (*StringBuilder) ToString ¶
func (s *StringBuilder) ToString() string
Returns the represented string
Click to show internal directories.
Click to hide internal directories.