* Convert hexadecimal string to big endian * * @param str String which will be converted * * @return @c true if conversion went OK, @c false otherwise */
| 166 | * @return @c true if conversion went OK, @c false otherwise |
| 167 | */ |
| 168 | bool ByteValueStorage::hexToBig(std::string& str) const |
| 169 | { |
| 170 | if (isUnknownEndian()) |
| 171 | { |
| 172 | return false; |
| 173 | } |
| 174 | |
| 175 | return isBigEndian() |
| 176 | ? true |
| 177 | : swapEndianness( |
| 178 | str, |
| 179 | getBytesPerWord(), |
| 180 | getNumberOfNibblesInByte() |
| 181 | ); |
| 182 | } |
| 183 | |
| 184 | /** |
| 185 | * Convert hexadecimal string to little endian |