| Top |
| const gchar * | gfls_utf8_find_very_long_line () |
| GflsValidatedString * | gfls_utf8_validate () |
const gchar * gfls_utf8_find_very_long_line (const gchar *str,guint max_n_bytes_per_line);
Finds if a line in str
exceeds max_n_bytes_per_line
.
For performance reasons, str
is not checked whether it is a valid UTF-8
string. So you must call for example g_utf8_validate() beforehand.
str |
a UTF-8 nul-terminated string. |
|
max_n_bytes_per_line |
the maximum number of bytes per line, without counting the newline character(s). |
Since: 0.3
GflsValidatedString *
gfls_utf8_validate (GBytes *bytes);
Validates bytes
. The invalid bytes will be escaped with
gfls_utils_bytes_to_hex_representation() and will be located in separate
(invalid) GflsValidatedStringChunk's.
The format of the input bytes
is important: the data contained in bytes
must always be nul-terminated, but this must not be included in the GBytes
length. (The reason is to accommodate the convention of
GflsValidatedStringChunk, to avoid a copy if the whole bytes
is valid).
The returned GflsValidatedString has already been simplified; see
gfls_validated_string_builder_simplify().
[skip]
Since: 0.5