Function
notEmpty(_:)
Tests whether a collection or string is not empty.
func notEmpty(_ value: any EcoreValue) throws -> EBoolean
Parameters
value-
The collection or string to check
Return Value
true if not empty, false otherwise
Discussion
The notEmpty operation is the logical inverse of isEmpty, returning true if the collection has at least one element or if the string has at least one character.
Examples
let numbers = [1, 2, 3] as [EInt]
let result = try notEmpty(numbers) // Result: true