(pattern string)
| 43 | } |
| 44 | |
| 45 | func NewBufferFilterForString(pattern string) *BufferFilter { |
| 46 | if len(pattern) < 2 { |
| 47 | // Very short patterns are unprofitable. |
| 48 | return nil |
| 49 | } |
| 50 | return &BufferFilter{op: opStringFinder, f: stringsearch.NewFinder(pattern)} |
| 51 | } |
| 52 | |
| 53 | func NewBufferFilterForStringCase(pattern string) *BufferFilter { |
| 54 | if len(pattern) < 2 { |
no test coverage detected