Spec-Zone.ru › ColdFusion

isNumeric

Determines whether a string can be converted to a numeric value. Supports numbers in U.S. number format. For other number support use LSIsNumeric.

isNumeric(String) → returns boolean

  • CF
  • Lucee
  • BL 1.0.0+
  • See Also: isValid

    Argument Reference

    String string
    Required

    Examples
    Sample code invoking the isNumeric function

    Integer isNumeric

    isNumeric(23)

    Expected Result: YES

    String isNumeric

    isNumeric("twenty")

    Expected Result: NO

    Scientific Notation

    The number 5e2 is scientific notation for 5 x 10^2 aka 500

    isNumeric(5e2)

    Expected Result: YES

    © 2012–present Foundeo, Inc. and the CFDocs contributors.
    Licensed under the MIT License.
    ColdFusion is a trademark of Adobe Systems Incorporated.
    https://cfdocs.org/isnumeric

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API