CDE
This commit is contained in:
parent
518da4a923
commit
764da6cbbb
6144 changed files with 83610 additions and 11 deletions
10
Task/Empty-string/Scala/empty-string.scala
Normal file
10
Task/Empty-string/Scala/empty-string.scala
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// assign empty string to a variable
|
||||
val s=""
|
||||
// check that string is empty
|
||||
s.isEmpty // true
|
||||
s=="" // true
|
||||
s.size==0 // true
|
||||
// check that string is not empty
|
||||
s.nonEmpty // false
|
||||
s!="" // false
|
||||
s.size>0 // false
|
||||
Loading…
Add table
Add a link
Reference in a new issue