Function terminal_cli::longest_common_prefix [] [src]

pub fn longest_common_prefix<'a>(strings: &'a [&'a str]) -> Option<&'a str>

A naive implementation. Can be implemented with a trie, but it's overkill here. http://en.wikipedia.org/wiki/LCP_array