14 lines
358 B
Text
14 lines
358 B
Text
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));
|
|
io:println("'s' is not empty? ", !isEmpty(s));
|
|
io:println("'t' is empty? ", isEmpty(t));
|
|
io:println("'t' is not empty? ", !isEmpty(t));
|
|
}
|