17 lines
619 B
Plaintext
17 lines
619 B
Plaintext
s := "" # null string
|
|
s := string('A'--'A') # ... converted from cset difference
|
|
s := char(0)[0:0] # ... by slicing
|
|
|
|
s1 == "" # lexical comparison, could convert s1 to string
|
|
s1 === "" # comparison won't force conversion
|
|
*s1 = 0 # zero length, however, *x is polymorphic
|
|
*string(s1) = 0 # zero length string
|
|
|
|
s1 ~== "" # non null strings comparisons
|
|
s1 ~=== ""
|
|
*string(s1) ~= 0
|
|
|
|
s := &null # NOT a null string, null type
|
|
/s # test for null type
|
|
\s # test for non-null type
|