make ToUpper, ToLower etc. handle unicode properly.
Change their names too.
R=rsc
DELTA=206 (123 added, 2 deleted, 81 changed)
OCL=34170
CL=34194
diff --git a/src/pkg/utf8/utf8.go b/src/pkg/utf8/utf8.go
index 62adcd9..2604c55 100644
--- a/src/pkg/utf8/utf8.go
+++ b/src/pkg/utf8/utf8.go
@@ -290,3 +290,9 @@
return n;
}
+// RuneStart reports whether the byte could be the first byte of
+// an encoded rune. Second and subsequent bytes always have the top
+// two bits set to 10.
+func RuneStart(b byte) bool {
+ return b & 0xC0 != 0x80
+}