MCPcopy Create free account
hub / github.com/djhworld/simple-computer / ValueToString

Function ValueToString

utils/common.go:7–16  ·  view source on GitHub ↗
(val uint16)

Source from the content-addressed store, hash-verified

5)
6
7func ValueToString(val uint16) string {
8 if val <= 0x000F {
9 return fmt.Sprintf("0x000%X", val)
10 } else if val <= 0x00FF {
11 return fmt.Sprintf("0x00%X", val)
12 } else if val <= 0x0FFF {
13 return fmt.Sprintf("0x0%X", val)
14 }
15 return fmt.Sprintf("0x%X", val)
16}

Callers 5

StringMethod · 0.92
StringMethod · 0.92
StringMethod · 0.92
ToStringMethod · 0.92
StringMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected