is_str_float

pyrcs.utils.is_str_float(x)

Check if a string-type variable can express a float-type value.

Parameters:

x (str) – A string-type variable.

Returns:

Whether str_val can express a float value.

Return type:

bool

Examples:

>>> from pyrcs.utils import is_str_float

>>> is_str_float('')
False

>>> is_str_float('a')
False

>>> is_str_float('1')
True

>>> is_str_float('1.1')
True