Skip to main content

longest_common_prefix

Function longest_common_prefix 

Source
pub fn longest_common_prefix(candidates: &[String]) -> String
Expand description

Return the longest string that is a common prefix of all candidates. Returns an empty string when candidates is empty or contains no common prefix.