stringutils

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveANSICodes

func RemoveANSICodes(input string) string

Types

type LiteralStringPart added in v0.6.2

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

func (LiteralStringPart) Value added in v0.6.2

func (l LiteralStringPart) Value() string

type QuotedStringPart added in v0.6.2

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

func (QuotedStringPart) Value added in v0.6.2

func (q QuotedStringPart) Value() string

type StringPart added in v0.6.2

type StringPart interface {
	Value() string
}

func SplitQuotedStrings added in v0.6.2

func SplitQuotedStrings(input string) []StringPart

SplitQuotedStrings will take a string and return a list of parts. Double quotes, single quotes, and backticks are supported. The backslash character is used to escape the quote character. Special cases where English contractions are used is supported, so "don't" will not be treated as the start or end of a quoted string.

Jump to

Keyboard shortcuts

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