Pattern::is_prefix_of
fn is_prefix_of(P pat, string hay) -> bool Import
Source: use text::{Pattern}; src/text.hy Returns true when a match starts at the beginning of hay.
Parameters#
| Name | Type |
|---|---|
pat | P |
hay | string |
Returns#
bool
See also#
Pattern: Something a [Searchable] value can be searched for: a plainstring(matched literally), or a type such as coil-regex’sRegex.Pattern::find_in: Returns the span of the leftmost match inhayat or after bytefrom.Pattern::is_suffix_of: Returnstruewhen a match ends at the end ofhay.Pattern::expand: Returns the replacement text for the matchfind_injust returned.