Skip to main content

match_by_substring

Function match_by_substring 

Source
pub fn match_by_substring(
    all_names: &[Box<str>],
    queries: &[Box<str>],
    entity_type: &str,
) -> Result<(Vec<usize>, Vec<Box<str>>)>
Expand description

Match names by substring queries and return matched indices and names

§Arguments

  • all_names - All available names to search through
  • queries - Substring queries to match against
  • entity_type - Description of what’s being matched (e.g., “column”, “row”) for error messages

§Returns

A tuple of (matched_indices, matched_names)