Append a number with zero prefilling
| 1075 | |
| 1076 | // Append a number with zero prefilling |
| 1077 | bool append_zerofill(uint num, uint width) |
| 1078 | { |
| 1079 | static const char zeros[15]= "00000000000000"; |
| 1080 | char intbuff[15]; |
| 1081 | uint length= (uint) (int10_to_str(num, intbuff, 10) - intbuff); |
| 1082 | if (length < width && |
| 1083 | append(zeros, width - length, &my_charset_latin1)) |
| 1084 | return true; |
| 1085 | return append(intbuff, length, &my_charset_latin1); |
| 1086 | } |
| 1087 | |
| 1088 | /* |
| 1089 | Append a bitmask in an uint32 with a translation into a |
no test coverage detected