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

text

package module
v0.0.0-...-06c234d Latest Latest
Warning

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

Go to latest
Published: May 12, 2014 License: Apache-2.0, BSD-3-Clause Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var URLsAndHashtags = FlagURLs | FlagHashtags

Functions

func ExtractHashtags

func ExtractHashtags(s string) []string

func ExtractURLs

func ExtractURLs(s string) []string

Types

type Entities

type Entities struct {
	Hashtags []Match
	URLs     []Match
}

func Extract

func Extract(s string, flags Flag) *Entities

type Flag

type Flag int
const (
	FlagURLs Flag = 1 << iota
	FlagHashtags
	FlagOverlapping
)

type Match

type Match struct {
	Text    string
	Indices [2]int
}

func ExtractHashtagMatches

func ExtractHashtagMatches(s string) []Match

func ExtractURLMatches

func ExtractURLMatches(s string) []Match

Jump to

Keyboard shortcuts

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