str

16 functions. Each has a page of its own.

FunctionSummary
str.containsTests whether one string occurs inside another.
str.endswithAsks whether a string finishes with a given ending.
str.format_timeRenders a time value as text.
str.lengthGives the length of a string as an int.
str.lowerConverts a string to lower case.
str.matchReturns the first part of source that matches the regular expression pattern.
str.posReports the position at which one string sits inside another.
str.repeatProduces a string made of repeated copies of another, with the option of something between the copies.
str.replaceSubstitutes one piece of text for another inside a string.
str.replace_allSubstitutes new text for every occurrence of the old text.
str.startswithThe counterpart of str.endswith, looking at the front of the string instead of the back.
str.substringCuts a piece out of a string. There are two forms: one takes a start and an end, the other takes a start alone.
str.tonumberReads a number out of a string.
str.tostringRenders a value as a string. One overload takes a number and one takes a bool.
str.trimRemoves whitespace from around a string and hands back the result.
str.upperConverts 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.
Upgrade