EXPAND ALL
- Home
- About Pixie
- Installing Pixie
- Using Pixie
- Tutorials
- Reference
Extracts the substring from the string starting at index pos
and for length
characters. If pos > len(string)
, px.substr
returns the empty string. If pos < len(string)
but pos + length > len(string)
, px.substr
returns the maximum length substring starting at pos
The substring from `string`.
Variable | Type | Description |
---|---|---|
string | STRING | The string to get the substring from. |
pos | INT64 | The position to start the substring, inclusive. |
length | INT64 | The length of the substring to return. |
df.service = 'checkout'df.str = px.substring(df.service, 1, 5) # 'hecko'