rust_algorithm
pub fn gcd_of_strings(str1: String, str2: String) -> Option<String>
求两个字符串的最大公约字符串
str1
str2
use rust_algorithm::gcd_of_strings; let result = gcd_of_strings(String::from("ABCABCABC"), String::from("ABC")); assert_eq!(result.unwrap(), "ABC");