FUNCTION::STRINGAT(3stap) A collection of standard strin FUNCTION::STRINGAT(3stap)

# [NAME](#NAME)

function::stringat - Returns the char at a given position in the string

# [SYNOPSIS](#SYNOPSIS)

```


    stringat:long(str:string,pos:long)
```

# [ARGUMENTS](#ARGUMENTS)

*str*

the string to fetch the character from

*pos*

the position to get the character from (first character is 0)

# [DESCRIPTION](#DESCRIPTION)

This function returns the character at a given position in the string or zero if the string doesn't have as many characters. Reports an error if pos is out of bounds.

# [SEE ALSO0](#SEE_ALSO0)

[*tapset::string*(3stap)](/man/enterprise-packages/systemtap/tapset::string.3stap)

September 2026 SystemTap Tapset Reference Ver

---

Document: function::stringat(3stap) from systemtap 5.6-r0 (Chainguard OS)
Source: https://sourceware.org/git/systemtap.git
