FormatHelper
Constructors
Constructor
new FormatHelper():
FormatHelper
Returns
FormatHelper
Methods
fit2length()
staticfit2length(value,length,side,wildcard):string
Fits a value to a specific length
Parameters
value
string
The value you want to fit
length
number
The length of your result
side
string
"r" or "l" for the side you want to append your wildcard
wildcard
string
The character that will be append
Returns
string
convertStringToNumber()
staticconvertStringToNumber(strNum):number
Converts a string-value to a number-value
Parameters
strNum
string
is the number in a string format
Returns
number
formatNumber()
staticformatNumber(number,decimals,dec_point,thousands_sep):string
Fits a Number to a specific format
Parameters
number
number
The number value
decimals
number
The amount of decimal places
dec_point
string
The decimal separator
thousands_sep
string
The thousands separator
Returns
string
convertNumberToString()
staticconvertNumberToString(Num):string
Converts a number-value to a string-value
Parameters
Num
number
Number-value that will be converted to string
Returns
string