MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / start_with

Method start_with

publication/code/chapter10/trie.rs:39–41  ·  view source on GitHub ↗

判断是否存在以某个前缀开头的单词

(&self, prefix: &str)

Source from the content-addressed store, hash-verified

37
38 // 判断是否存在以某个前缀开头的单词
39 fn start_with(&self, prefix: &str) -> bool {
40 self.word_node(prefix).is_some()
41 }
42
43 // 前缀字符串
44 // wps: word_prefix_string

Callers 1

mainFunction · 0.45

Calls 1

word_nodeMethod · 0.45

Tested by

no test coverage detected