Merge: doc: fixed some typos and other misc. corrections
[nit.git] / examples / rosettacode / empty_string.nit
1 #!/usr/bin/env nit
2 #
3 # This file is part of NIT ( http://www.nitlanguage.org ).
4 # This program is public domain
5
6 # Task: Empty_string
7 # SEE: <http://rosettacode.org/wiki/Empty_string>
8 module empty_string
9
10 var s = ""
11
12 if s.is_empty then print "Is empty"
13 if s == "" then print "Is empty"
14 if s.length == 0 then print "Is empty"
15
16 if not s.is_empty then print "Not empty"
17 if s != "" then print "Not empty"
18 if s.length > 0 then print "Not empty"