(s string)
| 201 | } |
| 202 | |
| 203 | func regexpMaxPrefix(s string) string { |
| 204 | b := []byte(s) |
| 205 | for len(b) > 0 { |
| 206 | r, size := utf8.DecodeLastRune(b) |
| 207 | if r == utf8.MaxRune { |
| 208 | // remove last character and do this again |
| 209 | b = b[:len(b)-size] |
| 210 | } else { |
| 211 | return string(utf8.AppendRune(b[:len(b)-size], r+1)) |
| 212 | } |
| 213 | } |
| 214 | return "" |
| 215 | } |
| 216 | |
| 217 | func metaPrunerBinaryExpr(e *dag.BinaryExpr) dag.Expr { |
| 218 | switch e.Op { |