This commit is contained in:
cdle
2023-06-06 20:14:51 +08:00
parent 10f300626a
commit e9a82789d8
4 changed files with 78 additions and 15 deletions
+5
View File
@@ -9,6 +9,7 @@ import (
"strings"
"github.com/cdle/sillyplus/emoji"
"github.com/cdle/sillyplus/utils"
)
type Strings struct {
@@ -201,3 +202,7 @@ func (sender *Strings) ReplaceToEmojis(str string, pattern string) string {
func (sender *Strings) ExtractAddress(input string) string {
return regexp.MustCompile(`http[s]?://[\w.]+:?\d*`).FindString(input)
}
func (sender *Strings) Unique(str ...interface{}) []string {
return utils.Unique(str...)
}