MCPcopy Index your code
hub / github.com/pquerna/ffjson / prefixIsLessThan

Function prefixIsLessThan

fflib/v1/decimal.go:219–229  ·  view source on GitHub ↗

Is the leading prefix of b lexicographically less than s?

(b []byte, s string)

Source from the content-addressed store, hash-verified

217
218// Is the leading prefix of b lexicographically less than s?
219func prefixIsLessThan(b []byte, s string) bool {
220 for i := 0; i < len(s); i++ {
221 if i >= len(b) {
222 return true
223 }
224 if b[i] != s[i] {
225 return b[i] < s[i]
226 }
227 }
228 return false
229}
230
231// Binary shift left (/ 2) by k bits. k <= maxShift to avoid overflow.
232func leftShift(a *decimal, k uint) {

Callers 1

leftShiftFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…