检查字符串是否为浮点数.
StringIsFloat ( "字符串" )
字符串 | 目标字符串. |
成功: | 返回 1. |
失败: | 返回 0, 并非浮点数格式. |
StringIsFloat("1.5")
;返回 1
StringIsFloat("7.")
;返回
1,包含小数点
StringIsFloat("-.0")
;返回 1
StringIsFloat("3/4")
;返回 0,'3'、'4'
之间有斜杠,不是浮点数
StringIsFloat("2")
; 返回 0, '2' 是一个整数
StringIsFloat(1.5)
;返回 1,
1.5 转换后包含字符串 .
StringIsFloat(1.0)
;返回 0,
1.0 转换后不包含字符串 .
provider with jb51.net (unicode) |