Help us shape the future of Go! Take the 2026 Go Developer Survey

commonprefix

package
v1.34.9 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Prefix

func Prefix(strs ...string) string

Prefix returns the longest common prefix of the provided strings https://leetcode.com/problems/longest-common-prefix/discuss/374737/golang-runtime-0ms-simple-solution

func TrimPrefix

func TrimPrefix(strs ...string)

TrimPrefix removes the longest common prefix from all provided strings

Types

This section is empty.

Jump to

Keyboard shortcuts

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