Skip to main content

isEmpty

isEmpty(set: Set<IpAddress>) : Bool

Returns a Bool indicating if set contains no elements.

For example,

  • isEmpty(ipAddressSet([ipSubnet("1.2.3.4/32")])) returns false while
  • isEmpty(intersect(ipAddressSet([ipSubnet("1.2.3.4/32")]), ipAddressSet([ipSubnet("5.6.7.8/32")]))) returns true.

isEmpty(str: String) : Bool

Returns a Bool indicating if str has no characters. For example, isEmpty("") returns true while isEmpty("hello") returns false.

isEmpty(collection: Bag<T>) : Bool for any type T.

Returns a Bool indicating if a collection contains no elements.

For example, isEmpty([1, 2, 3]) returns false while isEmpty(foreach x in fromTo(1, 0) select x) returns true.

See also

Types

Functions