| 138 | } |
| 139 | |
| 140 | static std::string GetPostCode2(const ByteArray& bytes) |
| 141 | { |
| 142 | unsigned int val = GetInt(bytes, |
| 143 | {33, 34, 35, 36, 25, 26, 27, 28, 29, 30, 19, 20, 21, 22, 23, 24, 13, 14, 15, 16, 17, 18, 7, 8, 9, 10, 11, 12, 1, 2}); |
| 144 | unsigned int len = GetPostCode2Length(bytes); |
| 145 | // Pad or truncate to length |
| 146 | char buf[11]; // 30 bits 0x3FFFFFFF == 1073741823 (10 digits) |
| 147 | snprintf(buf, sizeof(buf), "%0*d", len, val); |
| 148 | buf[len] = '\0'; |
| 149 | return buf; |
| 150 | } |
| 151 | |
| 152 | static std::string GetPostCode3(const ByteArray& bytes) |
| 153 | { |
no test coverage detected