strs_isdecimal {strs} | R Documentation |
Check if string contains only decimal characters
Description
strs_isdecimal
checks whether each element of a character vector contains
only decimal characters. It is similar to Python's str.isdecimal()
method.
Usage
strs_isdecimal(string)
Arguments
string |
A character vector to be checked. |
Value
A logical vector of the same length as string
, indicating whether
each element contains only decimal characters.
See Also
Python str.isdecimal() documentation
Examples
strs_isdecimal("12345")
strs_isdecimal("123.45") # FALSE
[Package strs version 0.1.0 Index]