Skip to content

Commit 60e4223

Browse files
blakegarretsontammersaleh
authored andcommitted
Update index.md
Fix where "word" was used instead of "character", and fix one typo.
1 parent 891e6df commit 60e4223

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chapters/strings/reverse/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Reversing a String by Word or Character
33
question: How do I reverse a string by word or character?
44
---
55

6-
Reversing a string by word is very similar to the process to reverse an array. The difference is that strings are immutable in Go. Therefor, we must first convert the string to a mutable array of runes (`[]rune`), perform the reverse operation on that, and then re-cast to a string.
6+
Reversing a string by character is very similar to the process to reverse an array. The difference is that strings are immutable in Go. Therefore, we must first convert the string to a mutable array of runes (`[]rune`), perform the reverse operation on that, and then re-cast to a string.
77

88
{% include example.html example="reverse_by_character" %}
99

0 commit comments

Comments
 (0)