Skip to content

Commit 430252a

Browse files
authored
Update taste-objects.md
1 parent 662cf05 commit 430252a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_overviews/scala3-book/taste-objects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ For example, this `StringUtils` object contains a small collection of string-rel
2727

2828
```scala
2929
object StringUtils:
30-
def isNullOrEmpty(s: String): Boolean = s==null || s.trim == ""
30+
def isNullOrEmpty(s: String): Boolean = s==null || s.trim.isEmpty
3131
def leftTrim(s: String): String = s.replaceAll("^\\s+", "")
3232
def rightTrim(s: String): String = s.replaceAll("\\s+$", "")
3333
```

0 commit comments

Comments
 (0)