MCPcopy Create free account
hub / github.com/apache/cloudberry / pg_encoding_mblen

Function pg_encoding_mblen

src/common/wchar.c:1967–1973  ·  view source on GitHub ↗

* Returns the byte length of a multibyte character. * * Caution: when dealing with text that is not certainly valid in the * specified encoding, the result may exceed the actual remaining * string length. Callers that are not prepared to deal with that * should use pg_encoding_mblen_bounded() instead. */

Source from the content-addressed store, hash-verified

1965 * should use pg_encoding_mblen_bounded() instead.
1966 */
1967int
1968pg_encoding_mblen(int encoding, const char *mbstr)
1969{
1970 return (PG_VALID_ENCODING(encoding) ?
1971 pg_wchar_table[encoding].mblen((const unsigned char *) mbstr) :
1972 pg_wchar_table[PG_SQL_ASCII].mblen((const unsigned char *) mbstr));
1973}
1974
1975/*
1976 * Returns the byte length of a multibyte character; but not more than

Callers 14

strip_quotesFunction · 0.85
strtokx2Function · 0.85
sqlchar_to_unicodeFunction · 0.85
report_invalid_encodingFunction · 0.85
CopyAttributeOutTextFunction · 0.85
CopyAttributeOutCSVFunction · 0.85
fmtIdEncFunction · 0.85
test_enc_setupFunction · 0.85
PQmblenFunction · 0.85
PQmblenBoundedFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_enc_setupFunction · 0.68