stringutil

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonPrefix

func CommonPrefix(first, second string) string

CommonPrefix returns the common prefix of the specified strings. An empty string is returned if the parameters have no prefix in common.

func SliceContains

func SliceContains(terms []string, q string) bool

SliceContains returns true if terms contains q, or false otherwise.

func UniqueSlice

func UniqueSlice(items []string) []string

UniqueSlice returns a slice containing the unique items from the specified string slice. The items in the output slice are in the order in which they occur in the input slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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