lcp

package module
v0.0.0-...-7a3f384 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: Apache-2.0 Imports: 1 Imported by: 6

README

lcp

LCP is a library for detecting the longest common prefix among byte slices for Golang.

Features
  • Detect longest common prefix in byte slices
  • Detect longest common prefix lexicographically
  • Detect longest common prefix between two or multiple byte slices
Installation
go get github.com/abcum/lcp

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LCP

func LCP(items ...[]byte) []byte

LCP returns the longest common prefix between multiple slices of bytes. If no items are passed in to the method, then a nil byte slice is returned. If two or more byte slices are passed in to the method, then the longest common lexicographical prefix shared by all of the slices will be returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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