Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed Jun 9, 2024
1 parent ea6a9fa commit 015049a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/en/functions/strings/SliceString.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ aliases: [/functions/slicestr]
The START and END positions are zero-based, where `0` represents the first character of the string. If START is not specified, the substring will begin at position `0`. If END is not specified, the substring will end after the last character.

```go-html-template
{{ slicestr "BatMan" }}` → BatMan
{{ slicestr "BatMan" 3 }}` → Man
{{ slicestr "BatMan" 0 3 }}` → Bat
{{ slicestr "BatMan" }} → BatMan
{{ slicestr "BatMan" 3 }} → Man
{{ slicestr "BatMan" 0 3 }} → Bat
```

The START and END arguments represent the endpoints of a [half-open interval], a concept that may be difficult to grasp when first encountered. You may find that the [`strings.Substr`] function is easier to understand.
Expand Down

0 comments on commit 015049a

Please sign in to comment.