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

```
INTEGER std.strlen(STRING s)
```

**Available in:** all subroutines

Returns the length of the string `s`. For example, `std.strlen("Hello world!");` 
will return `12` (because the string includes whitespaces and punctuation).

## Example

```vcl
if (std.strlen(req.http.Cookie) > 1024) {
  unset req.http.Cookie;
}
```
