Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
16
Task/Empty-string/Bait/empty-string.bait
Normal file
16
Task/Empty-string/Bait/empty-string.bait
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
fun main() {
|
||||
mut e := "" // Declare empty string
|
||||
e = "" // Assign empty string
|
||||
|
||||
// Use either condition to check if the string is empty
|
||||
if e == "" and e.length == 0 {
|
||||
println("`e` is an empty string")
|
||||
}
|
||||
|
||||
s := "not empty"
|
||||
|
||||
// Use either condition to check if the string is _not_ empty
|
||||
if s != "" and s.length > 0 {
|
||||
println("`s` is not an empty string")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue