PINE LIBRARY
已更新 Sub-Super Script and Roman numerals Library

Library "Sub_Super_Script_and_RomanNumerals_Library"
Library to transform numbers into Roman numerals / Super-Sub script / check if value is alpha or number
isnumber(input)
check to see if value is a number
Parameters:
input: (string/float/int) value to check
Returns: (na) if value is NOT a number and input (string/float/int) if value is a number
isalpha(input)
check a string if it is alpha(doesnt contain numbers)
Parameters:
input
Returns: (string) if string input does NOT contain numbers, return (na) if input string contains numbers
super(num)
convert a string's numbers from normal print to super-script [0⁰1¹2²3³4⁴5⁵6⁶7⁷8⁸9⁹]
Parameters:
num: (string/int/float) input value to transform
Returns: string of input with numbers converted to super-script
sub(num)
convert a string's numbers from normal print to sub-script [0₀1₁2₂3₃4₄5₅6₆7₇8₈9₉]
Parameters:
num: (string/int/float) input value to transform
Returns: string of input with numbers converted to sub-script
roman(num, trunc)
convert a string of numbers, float, or int
Parameters:
num: (string) input number to transform
trunc: (bool | false) true to truncate float value, false to show roman numerals with decimals (XX.VI)
Returns: string of roman numerals representing the input (num)
Library to transform numbers into Roman numerals / Super-Sub script / check if value is alpha or number
isnumber(input)
check to see if value is a number
Parameters:
input: (string/float/int) value to check
Returns: (na) if value is NOT a number and input (string/float/int) if value is a number
isalpha(input)
check a string if it is alpha(doesnt contain numbers)
Parameters:
input
Returns: (string) if string input does NOT contain numbers, return (na) if input string contains numbers
super(num)
convert a string's numbers from normal print to super-script [0⁰1¹2²3³4⁴5⁵6⁶7⁷8⁸9⁹]
Parameters:
num: (string/int/float) input value to transform
Returns: string of input with numbers converted to super-script
sub(num)
convert a string's numbers from normal print to sub-script [0₀1₁2₂3₃4₄5₅6₆7₇8₈9₉]
Parameters:
num: (string/int/float) input value to transform
Returns: string of input with numbers converted to sub-script
roman(num, trunc)
convert a string of numbers, float, or int
Parameters:
num: (string) input number to transform
trunc: (bool | false) true to truncate float value, false to show roman numerals with decimals (XX.VI)
Returns: string of roman numerals representing the input (num)
發行說明
v2發行說明
v3 commented out use case code for speedPine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。