Convert the input string to the storage format of this data. * The storage format is always UTF-8 or MBCS. * * @param a_pInputData NULL terminated source string to convert. All of * the data will be converted including the * terminating NULL character. * @param a_pOutputData Pointer to the buffer to receive the converted
| 3029 | * converted. |
| 3030 | */ |
| 3031 | bool ConvertToStore( |
| 3032 | const SI_CHAR * a_pInputData, |
| 3033 | char * a_pOutputData, |
| 3034 | size_t a_uOutputDataSize) |
| 3035 | { |
| 3036 | // calc input string length (SI_CHAR type and size independent) |
| 3037 | size_t uInputLen = strlen((const char *)a_pInputData) + 1; |
| 3038 | if (uInputLen > a_uOutputDataSize) { |
| 3039 | return false; |
| 3040 | } |
| 3041 | |
| 3042 | // ascii/UTF-8 needs no conversion |
| 3043 | memcpy(a_pOutputData, a_pInputData, uInputLen); |
| 3044 | return true; |
| 3045 | } |
| 3046 | }; |
| 3047 | |
| 3048 |
no outgoing calls
no test coverage detected