prefix

Function prefix 

Source
pub fn prefix(s1: &str, s2: &str) -> usize
Expand description

Calculate common prefix length for two strings.

A wrapper for Prefix.

use textdistance::str::prefix;
assert!(prefix("abc", "acbd") == 1); // "a"