string contains ci - part-cw/lambdanative GitHub Wiki
(string-contains-ci str pattern)
string-contains-ci return the index of the first case-insensitive occurrence of pattern in str
Parameter | Description |
---|---|
str | Input string |
pattern | The pattern string to look for |
Example
Example 1: String comparisons performed in a search field of an application
(if (fx= (string-length text) 1)
;; If only one character, just display things that start with it
(lambda (str1 str2) (string-ci=? (substring str1 0 1) str2))
;; Otherwise display all that contain it
(lambda (str1 str2) (string-contains-ci str1 str2))))