14 lines
241 B
Coq
14 lines
241 B
Coq
|
|
// define and initialize an empty string
|
||
|
|
mut s := ""
|
||
|
|
|
||
|
|
// assign an empty string to a variable
|
||
|
|
s = ""
|
||
|
|
|
||
|
|
// check that a string is empty, any of:
|
||
|
|
s == ""
|
||
|
|
s.len() == 0
|
||
|
|
|
||
|
|
// check that a string is not empty, any of:
|
||
|
|
s != ""
|
||
|
|
s.len() != 0 // or > 0
|