parsing artist url
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
@@ -21,3 +22,9 @@ func ZeroPad(num int, length int) string {
|
||||
}
|
||||
return strings.Repeat("0", length-len(str)) + str
|
||||
}
|
||||
|
||||
var numericRegex = regexp.MustCompile(`^[\d]+$`)
|
||||
|
||||
func IsNumeric(num string) bool {
|
||||
return numericRegex.MatchString(num)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user