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

```
FLOAT std.atof(STRING s)
```

**Available in:** all subroutines

Takes a string (which represents a float) as an argument and returns its value.
Behaves as if calling `std.strtof()` with a base
of 10.

## Example

```vcl
if (std.atof(req.http.X-String) > 21.82) {
  set req.http.X-TheAnswer = "Found";
}
```
