MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / convertLength

Method convertLength

src/common/CsConvert.h:244–260  ·  view source on GitHub ↗

To be used for measure length of conversion

Source from the content-addressed store, hash-verified

242
243 // To be used for measure length of conversion
244 ULONG convertLength(ULONG srcLen)
245 {
246 USHORT errCode;
247 ULONG errPos;
248 ULONG len = (*cnvt1->csconvert_fn_convert)(cnvt1, srcLen, NULL, 0, NULL, &errCode, &errPos);
249
250 if (cnvt2)
251 {
252 if (len != INTL_BAD_STR_LENGTH && errCode == 0)
253 len = (*cnvt2->csconvert_fn_convert)(cnvt2, len, NULL, 0, NULL, &errCode, &errPos);
254 }
255
256 if (len == INTL_BAD_STR_LENGTH || errCode != 0)
257 raiseError(isc_string_truncation);
258
259 return len;
260 }
261
262 const char* getName() const { return cnvt1->csconvert_name; }
263

Callers 7

toLowerMethod · 0.45
toUpperMethod · 0.45
lengthMethod · 0.45
substringMethod · 0.45
string_to_keyMethod · 0.45
compareMethod · 0.45
canonicalMethod · 0.45

Calls 1

raiseErrorFunction · 0.50

Tested by

no test coverage detected