strings

package
v0.0.0-...-13c6f0d Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: EUPL-1.2 Imports: 5 Imported by: 2

Documentation

Overview

Package strings provides some string functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JustifyLeft

func JustifyLeft(s string, maxLen int, pad rune) string

JustifyLeft ensures that the string has a defined length.

func Length

func Length(s string) int

Length returns the number of runes in the given string.

func NormalizeWords

func NormalizeWords(s string) (result []string)

NormalizeWords produces a word list that is normalized for better searching.

func Slugify

func Slugify(s string) string

Slugify returns a string that can be used as part of an URL

func SplitLineSeq

func SplitLineSeq(s string) iter.Seq[string]

SplitLineSeq returns an iterator over all lines in the given string.

func SplitLines

func SplitLines(s string) []string

SplitLines splits the given string into a list of lines.

func SplitWordSeq

func SplitWordSeq(s string) iter.Seq[string]

SplitWordSeq returns an iterator over all words, i.e. string that were separated by control character, space characters, or separator characters.

func SplitWords

func SplitWords(text string) []string

SplitWords produces a list of words, i.e. string that were separated by control character, space characters, or separator characters.

Types

This section is empty.

Source Files

  • slugify.go
  • strings.go

Jump to

Keyboard shortcuts

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