完美而准确,你值得拥有,还不快快收藏!

目录

逻辑实现

直接上代码
package main

import (
	"fmt"
	"regexp"
	"strconv"
	"strings"
)

var (
	numberRe = regexp.MustCompile("[0-9]+")
	wordRe   = regexp.MustCompile("[a-z]+")
)

func VersionGreaterThanT(a, b string) bool {
	return GreaterThan(a, b)
}

func stripMetadata(v string) string {
	split := strings.Split(v, "+")
	if len(split) > 1 {
		return split[0]
	}
	return v
}

func periodDashSplit(s string) []stri