RosettaCodeData/Task/Empty-string/EMal/empty-string.emal
2025-02-27 18:35:13 -05:00

9 lines
359 B
Text

# Demonstrate how to assign an empty string to a variable.
text sampleA ← Text.EMPTY
text sampleB ← "hello world"
text sampleC ← ""
List samples ← text[sampleA, sampleB, sampleC]
for each text sample in samples
# Demonstrate how to check that a string is empty.
writeLine("Is '", sample, "' empty? ", when(sample.isEmpty(), "Yes", "No"), ".")
end