matching_words: Matching words

Description Usage Arguments Value Examples

Description

Return a list of words that match a string passed as an argument. The match is anchored to the beginning of the string, so that words that start with the string "str" are returned.

Usage

1

Arguments

str

A character string that will be compared with the trie.

trie

A trie representing a list of words that will be searched.

Value

A vector of words represented in the trie that match the character string passed in as an argument.

Examples

1
2
3
trie <- char_tree(c('able', 'act', 'acts', 'across','act',
                    'bat','babble','bobble'), 'X')
matching_words('act',trie)

ezgraphs/rtrie documentation built on May 16, 2019, 9:57 a.m.