MCPcopy Create free account
hub / github.com/apple/foundationdb / ConvertFromStore

Method ConvertFromStore

fdbclient/include/fdbclient/SimpleIni.h:2482–2492  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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.

Callers 4

LoadDataMethod · 0.45
SetLongValueMethod · 0.45
SetDoubleValueMethod · 0.45
SetBoolValueMethod · 0.45

Calls 1

memcpyFunction · 0.85

Tested by

no test coverage detected