---
name: "function::strtol"
section: "3stap"
platform: "linux"
package: "systemtap-doc"
version: "5.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/function::strtol"
---

# function::strtol(3stap)

strtol - Convert a string to a long

## NAME

function::strtol - strtol - Convert a string to a long

## SYNOPSIS

```
    strtol:long(str:string,base:long)
```

## ARGUMENTS

*str*

string to convert

*base*

the base to use

## DESCRIPTION

This function converts the string representation of a number to an integer. The *base* parameter indicates the number base to assume for the string (eg. 16 for hex, 8 for octal, 2 for binary).

## SEE ALSO0

[*tapset::string*(3stap)](/tapset::string/3stap.md)
