MCPcopy Create free account
hub / github.com/Preloading/TwitterAPIBridge / findTagInstances

Function findTagInstances

twitterv1/interaction.go:418–430  ·  view source on GitHub ↗
(input string)

Source from the content-addressed store, hash-verified

416}
417
418func findTagInstances(input string) []bridge.FacetParsing {
419 regex := regexp.MustCompile(`#[a-zA-Z0-9_]+`)
420 matches := regex.FindAllStringIndex(input, -1)
421 results := []bridge.FacetParsing{}
422 for _, match := range matches {
423 results = append(results, bridge.FacetParsing{
424 Start: match[0],
425 End: match[1],
426 Item: input[match[0]+1 : match[1]],
427 })
428 }
429 return results
430}

Callers 2

status_updateFunction · 0.85
status_update_with_mediaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected