MCPcopy Index your code
hub / github.com/ChimeraCoder/gojson / stringifyFirstChar

Function stringifyFirstChar

json-to-struct.go:511–521  ·  view source on GitHub ↗

convert first character ints to strings

(str string)

Source from the content-addressed store, hash-verified

509
510// convert first character ints to strings
511func stringifyFirstChar(str string) string {
512 first := str[:1]
513
514 i, err := strconv.ParseInt(first, 10, 8)
515
516 if err != nil {
517 return str
518 }
519
520 return intToWordMap[i] + "_" + str[1:]
521}
522
523func mergeElements(i interface{}) interface{} {
524 switch i := i.(type) {

Callers 1

FmtFieldNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected