text

package
v1.11.0-b5 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package text contains utilities for text manipulation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Split2

func Split2(s string, sep byte) (left, right string)

Split2 splits a string into 2 parts: before and after sep. Split2 is faster than equivalent strings.SplitN and does no allocations. Looking for the first occurrence of a delimiter.

func Split2Reversed

func Split2Reversed(s string, sep byte) (left, right string)

Split2Reversed splits a string into 2 parts: before and after sep. Split2Reversed is faster than equivalent strings.SplitN and does no allocations. Looking for the last occurrence of a delimiter.

func ToSnakeCase

func ToSnakeCase(name string) string

ToSnakeCase converts given name to "snake_text_format".

Types

This section is empty.

Jump to

Keyboard shortcuts

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