# Funktionsreferenz

StringIsFloat

Prüft, ob die Zeichenfolge eine Gleitkommazahl ist.

StringIsFloat ( "string" )

Parameter

string | Die zu prüfende Zeichenfolge.

Bemerkungen

A string is a float if it contains at least one decimal digit and exactly one period; the only other character allowed is an optional plus or minus at the beginning. (StringIsFloat does not accept a comma character as the decimal point even if the computer Locale settings use that symbol.) If parameter is not a string, its value is converted to a string. See examples.

Siehe auch

StringIsInt, IsFloat

Beispiel

StringIsFloat("1.5") ;returns 1
StringIsFloat("7.") ;returns 1 since contains decimal
StringIsFloat("-.0") ;returns 1
StringIsFloat("3/4") ;returns 0 since '3' slash '4' is not a float
StringIsFloat(1.5) ;returns 1 since 1.5 converted to string contain .
StringIsFloat(1.0) ;returns 0 since 1.0 converted to string does not contain .