PINE LIBRARY

StrTrimPadCase

OVERVIEW

Contains various functions for manipulation with strings:

- padright() / padleft() - Pad a string to the right or left with a given char.

- trim2() - Trims not only spaces but also line breaks.

- nz(string) - like nz(), replaces na with a supplied string

FUNCTIONS

nz(s, replacement)
  Similar to nz() but for strings. However, since `string(na)` is the same as `""`
there is no such thing as `na` for strings. So, the function just replaces `""` with `replacement`.
  Parameters:
    s (string)
    replacement (string): (string) (Optional) A string returned when `s` is `""` / `na`. Default: `""`

method toUppercase(s)
  Converts a string to uppercase
  Namespace types: series string, simple string, input string, const string
  Parameters:
    s (string)

method toLowercase(s)
  Converts a string to uppercase
  Namespace types: series string, simple string, input string, const string
  Parameters:
    s (string)

method padright(this, length, char)
  pads a string up to `length` by adding `char`'s (spaces by default) to the end. (the first char of `char`
string is used). Respects max string length of 4096.
  Namespace types: series string, simple string, input string, const string
  Parameters:
    this (string)
    length (int)
    char (simple string): (string) A char to pad with. (if string longer than one char is supplied uses the first char)

method padleft(this, length, char)
  pads a string up to `length` by adding `char`'s (spaces by default) to the beginning(the first char of
`char` string is used). Respects max string length of 4096.
  Namespace types: series string, simple string, input string, const string
  Parameters:
    this (string)
    length (int)
    char (simple string): (string) A char to pad with. (if string longer than one char is supplied uses the first char)
stringstrings

Pine腳本庫

在真正的TradingView精神中,作者將這段Pine程式碼發佈為開源程式庫,以便我們社群的其他Pine程式設計師可以重複使用它。請向作者致敬!您可以私下使用這個函式庫,或在其他開源出版品中使用,但在出版物中再次使用這段程式碼將受到網站規則的約束。

免責聲明