TradingView
kaigouthro
20. Okt. 2022 06:37

font 

BAL / TetherUS PERPETUAL CONTRACTBinance

Beschreibung

Library "font"
Unicode Characters Replacement function for strings.

uni(_str, _number)
  Unicode Font Substitutee
  Parameters:
    _str: Input Strinbg
    _number: Font by Int input

uni(_str, _number)
  Unicode Font Substitutee
  Parameters:
    _str: Input Strinbg
    _number: Font by Name input

Versionshinweise

v2
added:

// string names for easy scripting varip _Sans = "Sans" varip _Sans_Italic = "Sans Italic" varip _Sans_Bold = "Sans Bold" varip _Sans_Bold_Italic = "Sans Bold Italic" varip _Sans_Serif = "Sans-Serif" varip _Sans_Serif_Italic = "Sans-Serif Italic" varip _Sans_Serif_Bold = "Sans-Serif Bold" varip _Sans_Serif_Bold_Italic = "Sans-Serif Bold Italic" varip _Fraktur = "Fraktur" varip _Fraktur_Bold = "Fraktur Bold" varip _Script = "Script" varip _Script_Bold = "Script Bold" varip _Double_Struck = "Double-Struck" varip _Monospace = "Monospace" varip _Regional_Indicator = "Regional Indicator" varip _Small = "Small" varip _Full_Width = "Full Width" varip _Circled = "Circled" // by number _string = font.uni(' your string input', 1) // by name _string = font.uni(' your string input', _Sans)

Versionshinweise

v3

Update, slightly faster overall and fewer local scopes created for large scripts, fixed typo on //@param for string input

Versionshinweise

v4
Now with Whitespace chars for a shortcut for those who use.
sorted largest at top to smallest.
any errors default to thin space.

int or string inputs.

Added:
space(_type)
  Hidden WhiteSpace Characterrs
  Parameters:
    _type: (string) WhiteSpace Type
  Returns: String Whitespace

Versionshinweise

v5

Added:
indent(_size)
  Indenter
  Parameters:
    _size: (intt) Number of tabs
  Returns: String of N number tabs
Kommentare
Duyck
Cool stuff, thanks for the shoutout!
Gr, JD.
FFriZz
pretty cool man thanks
kaigouthro
@FFriZz, thanks, it's just an updated version using the latest style guidelines and techniques. in use, it's most practical to set tis on vars that are global and only gets called once on the initial compile, but i made it so it's just as useful on live changing strings as wel. i'm going to make one fur iconography as well sometime. right now i've got a dozen bigger scripts in progress, and all require i slowly release and prep a few public libs first.. all my best stuff uses a bunch of private functions, so i have to publish each of those before i get to reach my more interesting stuff.. it comes together later for some super cool functions.
FFriZz
@kaigouthro, Cant wait to see em m8
davewantsmoore
@kaigouthro, thanks for sharing, seeing your code gives me so many tips and pointers for writting my own. <3
mtahreemalam
Awesome stuff man!
Mehr