forked from mirror/glob
This commit is contained in:
parent
3dc92f7b54
commit
f884dfeb2e
|
@ -37,5 +37,5 @@ func (self Any) Len() int {
|
|||
}
|
||||
|
||||
func (self Any) String() string {
|
||||
return fmt.Sprintf("<any:![%s]>", self.Separators)
|
||||
return fmt.Sprintf("<any:![%s]>", string(self.Separators))
|
||||
}
|
||||
|
|
|
@ -25,10 +25,6 @@ const (
|
|||
cacheToAndHigherIndex = 1023
|
||||
)
|
||||
|
||||
var asciiTable [128]byte
|
||||
|
||||
var segmentsByRuneLength [5][]int
|
||||
|
||||
var (
|
||||
segments0 = []int{0}
|
||||
segments1 = []int{1}
|
||||
|
@ -37,6 +33,14 @@ var (
|
|||
segments4 = []int{4}
|
||||
)
|
||||
|
||||
var segmentsByRuneLength [5][]int = [5][]int{
|
||||
0: segments0,
|
||||
1: segments1,
|
||||
2: segments2,
|
||||
3: segments3,
|
||||
4: segments4,
|
||||
}
|
||||
|
||||
const (
|
||||
asciiLo = 0
|
||||
asciiHi = 127
|
||||
|
@ -50,16 +54,6 @@ func init() {
|
|||
}}
|
||||
}(i)
|
||||
}
|
||||
|
||||
segmentsByRuneLength[0] = segments0
|
||||
segmentsByRuneLength[1] = segments1
|
||||
segmentsByRuneLength[2] = segments2
|
||||
segmentsByRuneLength[3] = segments3
|
||||
segmentsByRuneLength[4] = segments4
|
||||
|
||||
for i := 0; i <= 127; i++ {
|
||||
asciiTable[i] = 1
|
||||
}
|
||||
}
|
||||
|
||||
func getTableIndex(c int) int {
|
||||
|
|
Loading…
Reference in New Issue