Spec-Zone.ru › ColdFusion

structIsEmpty

Determines whether a structure contains data.

structIsEmpty(structure) → returns boolean

Member Function Syntax

someStruct.isEmpty()

  • CF4+
  • Lucee
  • BL 1.0.0+
  • Argument Reference

    structure struct
    Required

    Structure to test

    Examples
    Sample code invoking the structIsEmpty function

    Test to see if a struct is empty

    myStruct={};
    writeOutput( structIsEmpty(myStruct) );

    Expected Result: true

    Test to see if a struct contains something

    myStructWithThings={ "one": "foo", "two": "bar"};
    writeOutput( structIsEmpty(myStructWithThings) );

    Expected Result: false

    Using Member Function

    CF 11+ Lucee 4.5+

    myStruct={};
    writeOutput( myStruct.IsEmpty() );

    Expected Result: 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/structisempty

    Spec-Zone.ru

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