Spec-Zone.ru › ColdFusion

empty

Checks if a variable is empty

empty(variable) → returns boolean

This function requires Lucee. Not supported on Adobe ColdFusion, etc.
  • Lucee
  • See Also: isEmpty arrayIsEmpty structIsEmpty

    Argument Reference

    variable any
    Required

    Values:
    • ""
    • {}
    • []

    Compatibility

    Lucee:

    DEPRECATED since version 4.5 Use IsEmpty() instead.

    Examples
    Sample code invoking the empty function

    A Simple Empty Example

    Check whether the variable is empty or not

    <cfoutput>
    	<cfset Language = "Coldfusion">
    	#empty(Language)#
    	<cfset MyInput = "">
    	#empty(MyInput)#
    </cfoutput>

    Expected Result: false,true

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

    Spec-Zone.ru

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