MCPcopy Create free account
hub / github.com/corestoreio/pkg / IsDivisibleBy

Function IsDivisibleBy

util/validation/validator.go:422–430  ·  view source on GitHub ↗

IsDivisibleBy check if the string is a number that's divisible by another. If second argument is not valid integer or zero, it's return false. Otherwise, if first argument is not valid integer or zero, it's return true (Invalid string converts to zero).

(str, num string)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

TestIsDivisibleByFunction · 0.85
ExampleIsDivisibleByFunction · 0.85

Calls 1

ToInt64Method · 0.80

Tested by 2

TestIsDivisibleByFunction · 0.68
ExampleIsDivisibleByFunction · 0.68