Spec-Zone.ru › ColdFusion

yesNoFormat

Yes, for a true value; No for a false value, empty string or null. Throws an exception for other values.

yesNoFormat(value) → returns string

  • CF
  • Lucee
  • BL 1.0.0+
  • See Also: booleanFormat isBoolean trueFalseFormat

    Argument Reference

    value any
    Required

    A Boolean value or empty string

    Examples
    Sample code invoking the yesNoFormat function

    Example of Yes

    Pass in a true value outputs Yes

    yesNoFormat(true)

    Expected Result: Yes

    Example of No

    Pass in a false value outputs No

    yesNoFormat(false)

    Expected Result: No

    Example of empty string

    Pass in an empty string outputs No

    yesNoFormat("")

    Expected Result: No

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

    Spec-Zone.ru

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