Function voca_rs::query::query

source ·
pub fn query(subject: &str, search: &str, position: usize) -> bool
Expand description

Checks whether subject contains all characters from search starting from position. Respects an order of characters.

Arguments

  • subject - The string to verify.
  • search - The ending string.
  • position - The position to start searching.

Example

use voca_rs::*;
query::query("starship", "star", 0);
// => true
query::query("the world is yours", "te wld", 0);
// => true
query::query("galaxy", "g", 1);
// => false
use voca_rs::Voca;
"starship"._query("star", 0);
// => true