← Microsoft questions
CodingReported in a candidate post, Aug 2012

Custom case-insensitive string comparison function

Filed under Microsoft

Implement a custom case-insensitive string comparison function. It compares two strings s1 and s2 lexicographically ignoring character case and returns -1 if s1 < s2, 0 if s1 == s2, and 1 if s1 > s2.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.