]> Cypherpunks.ru repositories - gostls13.git/commit
unicode: change SimpleFold to handle invalid runes
authorRuss Cox <rsc@golang.org>
Wed, 12 Oct 2016 17:11:02 +0000 (13:11 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 12 Oct 2016 18:30:29 +0000 (18:30 +0000)
commit55ef67f2f85c51d415a030ae144a0b3301a097bd
treec0d130d65aa1e07f07f7a89ec530385955599fd6
parent413afcafbfd45b6b58023a49484d8480143960e0
unicode: change SimpleFold to handle invalid runes

Functions like ToLower and ToUpper return the invalid rune back,
so we might as well do the same here.

I changed my mind about panicking when I tried to document the behavior.

Fixes #16690 (again).

Change-Id: If1c68bfcd66daea160fd19948e7672b0e1add106
Reviewed-on: https://go-review.googlesource.com/30935
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/unicode/letter.go
src/unicode/letter_test.go