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

Method EncodeFirstToLowerSpecial

go/fory/meta/meta_string_encoder.go:104–109  ·  view source on GitHub ↗
(input string)

Source from the content-addressed store, hash-verified

102}
103
104func (e *Encoder) EncodeFirstToLowerSpecial(input string) ([]byte, error) {
105 // all chars in string are ASCII, so we can modify input[0] directly
106 chars := []byte(input)
107 chars[0] = chars[0] - 'A' + 'a' // chars[0] is sure to exist and is upper letter
108 return e.EncodeGeneric(chars, 5)
109}
110
111func (e *Encoder) EncodeAllToLowerSpecial(input string) ([]byte, error) {
112 chars := make([]byte, len(input)+countUppers(input))

Callers 1

EncodeWithEncodingMethod · 0.95

Calls 1

EncodeGenericMethod · 0.95

Tested by

no test coverage detected