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

Method convertLength

src/jrd/DataTypeUtil.cpp:217–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215
216
217ULONG DataTypeUtilBase::convertLength(ULONG len, USHORT srcCharSet, USHORT dstCharSet)
218{
219 if (dstCharSet == CS_NONE || dstCharSet == CS_BINARY)
220 return len;
221
222 return (len / maxBytesPerChar(srcCharSet)) * maxBytesPerChar(dstCharSet);
223}
224
225
226ULONG DataTypeUtilBase::convertLength(const dsc* src, const dsc* dst)

Callers 6

makeLeftRightFunction · 0.45
makeOverlayFunction · 0.45
makeReplaceFunction · 0.45
convertToUTF8Method · 0.45
coerceMethod · 0.45

Calls 3

isTextMethod · 0.80
getStringLengthMethod · 0.80
getCharSetMethod · 0.45

Tested by

no test coverage detected