str
16 functions. Each has a page of its own.
| Function | Summary |
|---|---|
str.contains | Tests whether one string occurs inside another. |
str.endswith | Asks whether a string finishes with a given ending. |
str.format_time | Renders a time value as text. |
str.length | Gives the length of a string as an int. |
str.lower | Converts a string to lower case. |
str.match | Returns the first part of source that matches the regular expression pattern. |
str.pos | Reports the position at which one string sits inside another. |
str.repeat | Produces a string made of repeated copies of another, with the option of something between the copies. |
str.replace | Substitutes one piece of text for another inside a string. |
str.replace_all | Substitutes new text for every occurrence of the old text. |
str.startswith | The counterpart of str.endswith, looking at the front of the string instead of the back. |
str.substring | Cuts a piece out of a string. There are two forms: one takes a start and an end, the other takes a start alone. |
str.tonumber | Reads a number out of a string. |
str.tostring | Renders a value as a string. One overload takes a number and one takes a bool. |
str.trim | Removes whitespace from around a string and hands back the result. |
str.upper | Converts a string to upper case; the other half of the pair with str.lower. |
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.