* Verify the first multibyte character of the given string. * Return its byte length if good, -1 if bad. (See comments above for * full details of the mbverifychar API.) */
| 1999 | * full details of the mbverifychar API.) |
| 2000 | */ |
| 2001 | int |
| 2002 | pg_encoding_verifymbchar(int encoding, const char *mbstr, int len) |
| 2003 | { |
| 2004 | return (PG_VALID_ENCODING(encoding) ? |
| 2005 | pg_wchar_table[encoding].mbverifychar((const unsigned char *) mbstr, len) : |
| 2006 | pg_wchar_table[PG_SQL_ASCII].mbverifychar((const unsigned char *) mbstr, len)); |
| 2007 | } |
| 2008 | |
| 2009 | /* |
| 2010 | * Verify that a string is valid for the given encoding. |
no outgoing calls
no test coverage detected