Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

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))))
Clone this wiki locally