ls 5 years ago
parent
commit
b0c47ca231
1 changed files with 9 additions and 0 deletions
  1. 9 0
      integer.go

+ 9 - 0
integer.go

@@ -0,0 +1,9 @@
+package tyr
+
+// CheckIntRange 检测整数范围
+func CheckIntRange(n, min, max int) bool {
+	if n < min || n > max {
+		return false
+	}
+	return true
+}