- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for cleanClass (0.09 sec)
-
src/regexp/syntax/parse.go
// Use &re.Rune instead of &class to avoid allocation. re.Rune = class class = cleanClass(&re.Rune) if sign < 0 { class = negateClass(class) } re.Rune = class p.push(re) return t, nil } // cleanClass sorts the ranges (pairs of elements of r), // merges them, and eliminates duplicates. func cleanClass(rp *[]rune) []rune { // Sort by lo increasing, hi decreasing to break ties.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 13:59:01 UTC 2024 - 52.1K bytes - Viewed (0) -
src/regexp/syntax/parse_test.go
// AppendRange should collapse each of the new ranges // into the earlier ones (it looks back two ranges), so that // the slice never grows very large. // Note that we are not calling cleanClass. var r []rune for i := rune('A'); i <= 'Z'; i++ { r = appendRange(r, i, i) r = appendRange(r, i+'a'-'A', i+'a'-'A') } if string(r) != "AZaz" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 16 16:02:30 UTC 2023 - 16.2K bytes - Viewed (0)