2025-06-11 20:16:52 -04:00
|
|
|
import ballerina/io;
|
|
|
|
|
|
|
|
|
|
function isEmpty(string s) returns boolean {
|
|
|
|
|
return s.length() == 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function main() {
|
|
|
|
|
string s = "";
|
|
|
|
|
string t = "0";
|
|
|
|
|
io:println("'s' is empty? ", isEmpty(s));
|
2026-04-30 12:34:36 -04:00
|
|
|
io:println("'s' is not empty? ", !isEmpty(s));
|
2025-06-11 20:16:52 -04:00
|
|
|
io:println("'t' is empty? ", isEmpty(t));
|
2026-04-30 12:34:36 -04:00
|
|
|
io:println("'t' is not empty? ", !isEmpty(t));
|
2025-06-11 20:16:52 -04:00
|
|
|
}
|