v0.0.97
This commit is contained in:
parent
dda2418255
commit
b156052e6f
@ -1,6 +1,9 @@
|
||||
package rext
|
||||
|
||||
import "regexp"
|
||||
import (
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/langext"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
type Regex interface {
|
||||
IsMatch(haystack string) bool
|
||||
@ -156,6 +159,13 @@ func (g OptRegexMatchGroup) ValueOrEmpty() string {
|
||||
return g.v.Value()
|
||||
}
|
||||
|
||||
func (g OptRegexMatchGroup) ValueOrNil() *string {
|
||||
if g.v == nil {
|
||||
return nil
|
||||
}
|
||||
return langext.Ptr(g.v.Value())
|
||||
}
|
||||
|
||||
func (g OptRegexMatchGroup) IsEmpty() bool {
|
||||
return g.v == nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user