- (string-contains string₁ string₂ [start₁ end₁ start₂ end₂]) → idx-or-falseprocedure
- (string-contains-right string₁ string₂ [start₁ end₁ start₂ end₂]) → idx-or-falseprocedure
Does the substring of string₁ specified by start₁ and end₁ contain the sequence of characters given by the substring of string₂ specified by start₂ and end₂?
Returns #f if there is no match. If start₂ = end₂, string-contains returns start₁ but string-contains-right returns end₁. Otherwise returns the index in string₁ for the first character of the first/last match; that index lies within the half-open interval [start₁, end₁), and the match lies entirely within the [start₁, end₁) range of string₁.
(string-contains "eek--what a geek." "ee" 12 18) ; Searches "a geek" ⇒ 15
Note: The names of these procedures do not end with a question mark. This indicates a useful value is returned when there is a match.