Rename method receivers from 'regex' to 're' (it's shorter)

This commit is contained in:
2025-02-09 15:51:46 -05:00
parent b60ded4136
commit 15ee49f42e
2 changed files with 28 additions and 28 deletions

View File

@@ -22,17 +22,17 @@ type Reg struct {
// NumSubexp returns the number of sub-expressions in the given [Reg]. This is equivalent
// to the number of capturing groups.
func (r Reg) NumSubexp() int {
return r.numGroups
func (re Reg) NumSubexp() int {
return re.numGroups
}
// String returns the string used to compile the expression.
func (r Reg) String() string {
return r.str
func (re Reg) String() string {
return re.str
}
func (r Reg) Longest() {
r.preferLongest = true
func (re *Reg) Longest() {
re.preferLongest = true
}
const concatRune rune = 0xF0001