Compare commits

...

1 Commits

Author SHA1 Message Date
b156052e6f v0.0.97 2023-03-29 19:53:53 +02:00

View File

@@ -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
}