stringHelper

package
v0.0.0-...-dffa276 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 1 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Concat

func Concat(buffer *bytes.Buffer, str string)

Concat concatenates string to buffer. According to 'Efficient String Concatenation in Go(http://herman.asia/efficient-string-concatenation-in-go)', bytes.Buffer is best choice for heavy-duty case. You should call buffer.String() to get a concatenated string after all concaternating finished.

func ConcatExist

func ConcatExist(strs []string, str string) []string

ConcatExist concatenates string to string array. According to 'Efficient String Concatenation in Go(http://herman.asia/efficient-string-concatenation-in-go)', When str is already exist, it's faster than buffer concatenation. You should call strings.Join(strs, "") to get a concatenated string after all concaternating finished.

func ConcatString

func ConcatString(leadingStr string, followingStr string) string

ConcatString concatenates leadingStr and followingStr.

Types

This section is empty.

Jump to

Keyboard shortcuts

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