Skip to content

Commit

Permalink
2024-08-17/01: add note about strings.ReplaceAll
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Aug 19, 2024
1 parent b666c65 commit 6a3deec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 2024-08-17/01-an-unordered-list-of-things-i-miss-in-go.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ for Go standard library, for example, `string.Replace`:
> of replacements.
If Go had default arguments, `Replace` could have e.g.: `func Replace(s, old,
new string, n int = -1)` signature, that would mean by default it would always
replace every instance of the `s` string, something that is generally expected
by default.
new string, n int = -1)` signature, that would mean we don't need
`strings.ReplaceAll` (since this is basically what this function does, call
`strings.Replace(s, old, new, -1)`).

## Nullability (or nillability)

Expand Down

0 comments on commit 6a3deec

Please sign in to comment.