Lipi Reference Lipi

Functions

str.trim()

Removes whitespace from around a string and hands back the result. Which characters count as whitespace is not stated in this edition.

Syntax · 1 of 4

                str.trim(const string source) → const string
              

Arguments

source required const string the string to trim

Return Type

const string

Syntax · 2 of 4

                str.trim(input string source) → input string
              

Arguments

source required input string the string to trim

Return Type

input string

Syntax · 3 of 4

                str.trim(simple string source) → simple string
              

Arguments

source required simple string the string to trim

Return Type

simple string

Syntax · 4 of 4

                str.trim(series string source) → series string
              

Arguments

source required series string the string to trim

Return Type

series string

Example


          indicator("String Trim Example", overlay=false)
strWithSpaces = "GoCharting"
trimmedStr = str.trim(strWithSpaces)
plot(close, title=trimmedStr)