Skip to content

strncmpi

Compare the first n characters of two strings (case-insensitive).

tf = strncmpi(str1, str2, n)

Like strncmp but case-insensitive.

strncmpi('Hello', 'HELP', 3) % 1
  • strncmp — Compare the first n characters of two strings (case-sensitive).
  • strcmpi — Compare strings for equality (case-insensitive).