MCPcopy
hub / github.com/golang/net / encodeDigit

Function encodeDigit

idna/punycode.go:196–204  ·  view source on GitHub ↗
(digit int32)

Source from the content-addressed store, hash-verified

194}
195
196func encodeDigit(digit int32) byte {
197 switch {
198 case 0 <= digit && digit < 26:
199 return byte(digit + 'a')
200 case 26 <= digit && digit < 36:
201 return byte(digit + ('0' - 26))
202 }
203 panic("idna: internal error in punycode encoding")
204}
205
206// adapt is the bias adaptation function specified in section 6.1.
207func adapt(delta, numPoints int32, firstTime bool) int32 {

Callers 1

encodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…