Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,17 +1,17 @@
|
|||
fn test(s string) {
|
||||
if s.len() == 0 {
|
||||
println("empty")
|
||||
} else {
|
||||
println("not empty")
|
||||
}
|
||||
if s.len() == 0 {
|
||||
println("empty")
|
||||
} else {
|
||||
println("not empty")
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// assign an empty string to a variable.
|
||||
str1 := ""
|
||||
str2 := " "
|
||||
// check if a string is empty.
|
||||
test(str1) // prt empty
|
||||
// check that a string is not empty.
|
||||
test(str2) // prt not empty
|
||||
// assign an empty string to a variable.
|
||||
str1 := ""
|
||||
str2 := " "
|
||||
// check if a string is empty.
|
||||
test(str1) // prt empty
|
||||
// check that a string is not empty.
|
||||
test(str2) // prt not empty
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue