// xxx - duplicate in TUI, go to lib
duplicate in TUI, go to lib
// xxx - duplicate in TUI go to lib
func hex2uint24(hexStr string) (uint32, error) {
        cleaned := strings.Replace(hexStr, "0x", "", 1)
        cleaned = strings.Replace(cleaned, "$", "", 1)
        cleaned = strings.Replace(cleaned, ":", "", -1)
        result, err := strconv.ParseUint(cleaned, 16, 32)
        return uint32(result) & 0x00ffffff, err
}
func hex2uint24 ( hexStr string ) ( uint32 , error ) { cleaned := strings . Replace ( hexStr , " " , " " , 1 ) cleaned = strings . Replace ( cleaned , " " , " " , 1 ) cleaned = strings . Replace ( cleaned , " " , " " , - 1 ) result , err := strconv . ParseUint ( cleaned , 16 , 32 ) return uint32 ( result ) & 0x00ffffff , err }
duplicate in TUI, go to lib
duplicate in TUI go to lib
// remove 0x suffix, $ and : characters