Family Day update
This commit is contained in:
parent
aac6731f2c
commit
9ad63ea473
2442 changed files with 39761 additions and 8255 deletions
14
Task/Empty-string/Go/empty-string-1.go
Normal file
14
Task/Empty-string/Go/empty-string-1.go
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// define and initialize an empty string
|
||||
var s string
|
||||
s2 := ""
|
||||
|
||||
// assign an empty string to a variable
|
||||
s = ""
|
||||
|
||||
// check that a string is empty, any of:
|
||||
s == ""
|
||||
len(s) == 0
|
||||
|
||||
// check that a string is not empty, any of:
|
||||
s != ""
|
||||
len(s) != 0 // or > 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue