Convert the input string from the storage format to SI_CHAR. * The storage format is always UTF-8 or MBCS. * * @param a_pInputData Data in storage format to be converted to SI_CHAR. * @param a_uInputDataLen Length of storage format data in bytes. This * must be the actual length of the data, including * NULL byte if NULL terminated string is r
| 2480 | * converted. |
| 2481 | */ |
| 2482 | bool ConvertFromStore(const char* a_pInputData, |
| 2483 | size_t a_uInputDataLen, |
| 2484 | SI_CHAR* a_pOutputData, |
| 2485 | size_t a_uOutputDataSize) { |
| 2486 | // ASCII/MBCS/UTF-8 needs no conversion |
| 2487 | if (a_uInputDataLen > a_uOutputDataSize) { |
| 2488 | return false; |
| 2489 | } |
| 2490 | memcpy(a_pOutputData, a_pInputData, a_uInputDataLen); |
| 2491 | return true; |
| 2492 | } |
| 2493 | |
| 2494 | /** Calculate the number of char required by the storage format of this |
| 2495 | * data. The storage format is always UTF-8 or MBCS. |
no test coverage detected