---
title: std.strcasecmp
summary: null
url: >-
  https://www.fastly.com/documentation/reference/vcl/functions/strings/std-strcasecmp
---

```
BOOL std.strcasecmp(STRING s1, STRING s2)
```

**Available in:** all subroutines

Compares strings for equality using case-insensitive comparison.
This is equivalent to converting both strings to the same case
(i.e. by `std.toupper` or `std.tolower`) and comparing the result.

Use the `==` operator for case-sensitive string comparisons.

This function does not support UTF-8 encoded strings.
For example, `"smörgås"` and `"SMÖRGÅS"` compare false.

If either string is _not-set_, `std.strcasecmp` will return false.
This matches the behavior for the `==` operator.
