fix: rune manipulator typo
This commit is contained in:
@ -58,7 +58,7 @@ func main() {
|
|||||||
// Print the last rune of the strings
|
// Print the last rune of the strings
|
||||||
// Hint: Use utf8.DecodeLastRuneInString
|
// Hint: Use utf8.DecodeLastRuneInString
|
||||||
r, size = utf8.DecodeLastRuneInString(s)
|
r, size = utf8.DecodeLastRuneInString(s)
|
||||||
fmt.Printf("\tfirst : %q (%d bytes)\n", r, size)
|
fmt.Printf("\tlast : %q (%d bytes)\n", r, size)
|
||||||
|
|
||||||
// Slice and print the first two runes of the strings
|
// Slice and print the first two runes of the strings
|
||||||
_, first := utf8.DecodeRuneInString(s)
|
_, first := utf8.DecodeRuneInString(s)
|
||||||
|
Reference in New Issue
Block a user