Skip to content

Commit 3bb25a1

Browse files
committed
Extend String module with more examples and clean it up.
1 parent a6c7d04 commit 3bb25a1

File tree

6 files changed

+541
-343
lines changed

6 files changed

+541
-343
lines changed

core/source/Number.mint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ module Number {
8787
digits =
8888
parts[0]
8989
|> Maybe.withDefault("")
90-
|> String.lchop("-")
90+
|> String.chopStart("-")
9191
|> String.split("")
9292
|> Array.groupsOfFromEnd(3)
9393
|> Array.map(String.join(""))
@@ -96,7 +96,7 @@ module Number {
9696
decimals =
9797
parts[1]
9898
|> Maybe.withDefault("")
99-
|> String.rchop("0")
99+
|> String.chopEnd("0")
100100

101101
if (String.isEmpty(decimals)) {
102102
prefix + digits

0 commit comments

Comments
 (0)