MCPcopy Create free account
hub / github.com/apache/fory / charToValueLowerUpperDigitSpecial

Method charToValueLowerUpperDigitSpecial

go/fory/meta/meta_string_encoder.go:292–307  ·  view source on GitHub ↗
(c byte)

Source from the content-addressed store, hash-verified

290}
291
292func (e *Encoder) charToValueLowerUpperDigitSpecial(c byte) (val byte, err error) {
293 if c >= 'a' && c <= 'z' {
294 val = c - 'a'
295 } else if c >= 'A' && c <= 'Z' {
296 val = 26 + (c - 'A')
297 } else if c >= '0' && c <= '9' {
298 val = 52 + (c - '0')
299 } else if c == e.specialChar1 {
300 val = 62
301 } else if c == e.specialChar2 {
302 val = 63
303 } else {
304 err = fmt.Errorf("Unsupported character for LOWER_UPPER_DIGIT_SPECIAL encoding: %v\n", c)
305 }
306 return
307}

Callers 1

EncodeGenericMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected