powered by
Computes the number of decimal places in the character representation of a number.
decimalplaces(x)
Integer: The number of digits after the decimal point; 0 if there is no decimal point.
0
A character string representing a number.
decimalplaces("3.141") # returns 3 decimalplaces("42") # returns 0
Run the code above in your browser using DataLab