From d282d9afb8e882090b267462e502a4170100295e Mon Sep 17 00:00:00 2001
From: Aan Niraj Patel
Date: Wed, 21 Feb 2024 21:29:24 -0500
Subject: [PATCH] Fix verbiage for Strings and Runes (noissue)
---
examples/strings-and-runes/strings-and-runes.go | 5 +++--
examples/strings-and-runes/strings-and-runes.hash | 4 ++--
public/strings-and-runes | 7 ++++---
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/examples/strings-and-runes/strings-and-runes.go b/examples/strings-and-runes/strings-and-runes.go
index acbd0cc66..9501c8a94 100644
--- a/examples/strings-and-runes/strings-and-runes.go
+++ b/examples/strings-and-runes/strings-and-runes.go
@@ -38,8 +38,9 @@ func main() {
// the `utf8` package. Note that the run-time of
// `RuneCountInString` depends on the size of the string,
// because it has to decode each UTF-8 rune sequentially.
- // Some Thai characters are represented by multiple UTF-8
- // code points, so the result of this count may be surprising.
+ // Some Thai characters are represented by UTF-8 code points
+ // that can span multiple bytes, so the result of this count
+ // may be surprising.
fmt.Println("Rune count:", utf8.RuneCountInString(s))
// A `range` loop handles strings specially and decodes
diff --git a/examples/strings-and-runes/strings-and-runes.hash b/examples/strings-and-runes/strings-and-runes.hash
index 99cc716e1..9f8571b81 100644
--- a/examples/strings-and-runes/strings-and-runes.hash
+++ b/examples/strings-and-runes/strings-and-runes.hash
@@ -1,2 +1,2 @@
-45a1127788eb4c0acfef48efee9ca386e06d4c58
-39BpTLf6BAz
+ffbc918567cea7cdadcaee87ffc404a1d4f5c62a
+-iNDXZ9IM3s
diff --git a/public/strings-and-runes b/public/strings-and-runes
index f5bf97e9e..84126885b 100644
--- a/public/strings-and-runes
+++ b/public/strings-and-runes
@@ -48,7 +48,7 @@ introduction to the topic.
-
+
package main
|
@@ -124,8 +124,9 @@ the bytes that constitute the code points in s
.
the utf8
package. Note that the run-time of
RuneCountInString
depends on the size of the string,
because it has to decode each UTF-8 rune sequentially.
-Some Thai characters are represented by multiple UTF-8
-code points, so the result of this count may be surprising.
+Some Thai characters are represented by UTF-8 code points
+that can span multiple bytes, so the result of this count
+may be surprising.
|