Chops off the n lowest bits from a bit pattern. Returns the n lowest bits. As a side effect, the original bit pattern will be shifted to the right by n bits.
| 3236 | // lowest bits. As a side effect, the original bit pattern will be |
| 3237 | // shifted to the right by n bits. |
| 3238 | inline UInt32 ChopLowBits(UInt32* bits, int n) { |
| 3239 | const UInt32 low_bits = *bits & ((static_cast<UInt32>(1) << n) - 1); |
| 3240 | *bits >>= n; |
| 3241 | return low_bits; |
| 3242 | } |
| 3243 | |
| 3244 | // Converts a Unicode code point to a narrow string in UTF-8 encoding. |
| 3245 | // code_point parameter is of type UInt32 because wchar_t may not be |