Returns the next Rune in r's folding cycle (see unicode_casefold.h). Examples: CycleFoldRune('A') = 'a' CycleFoldRune('a') = 'A' CycleFoldRune('K') = 'k' CycleFoldRune('k') = 0x212A (Kelvin) CycleFoldRune(0x212A) = 'K' CycleFoldRune('?') = '?'
| 333 | // |
| 334 | // CycleFoldRune('?') = '?' |
| 335 | Rune CycleFoldRune(Rune r) { |
| 336 | const CaseFold* f = LookupCaseFold(unicode_casefold, num_unicode_casefold, r); |
| 337 | if (f == NULL || r < f->lo) |
| 338 | return r; |
| 339 | return ApplyFold(f, r); |
| 340 | } |
| 341 | |
| 342 | // Add lo-hi to the class, along with their fold-equivalent characters. |
| 343 | // If lo-hi is already in the class, assume that the fold-equivalent |
no test coverage detected