| Top |
GflsValidatedStringChunkGflsValidatedStringChunk — A chunk of a GflsValidatedString |
GflsValidatedStringChunk *
gfls_validated_string_chunk_new (GBytes *bytes);
Creates a new chunk.
The format of bytes
is important: the data contained in bytes
must always
be nul-terminated, but this must not be included in the GBytes length.
Since: 0.5
GflsValidatedStringChunk *
gfls_validated_string_chunk_ref (GflsValidatedStringChunk *chunk);
Increases the reference count of chunk
by one.
Since: 0.5
void
gfls_validated_string_chunk_unref (GflsValidatedStringChunk *chunk);
Decreases the reference count of chunk
by one. If the reference count drops
to 0, chunk
is freed.
Since: 0.5
GBytes *
gfls_validated_string_chunk_get_bytes (GflsValidatedStringChunk *chunk);
The data contained in the GBytes is always nul-terminated, but this is not included in the GBytes length.
Since: 0.5
gboolean
gfls_validated_string_chunk_get_valid (GflsValidatedStringChunk *chunk);
Semantics:
If the chunk data is “valid”, it means that all the characters in it were and are valid.
If the chunk data is “invalid”, it means that all the characters in it were initially invalid, but have been validated (e.g., by escaping them).
So, a chunk is either all valid, or all invalid. There can't be a mix of both. To mix both valid and invalid characters in a string, you need to create several chunks.
Since: 0.5
void gfls_validated_string_chunk_set_valid (GflsValidatedStringChunk *chunk,gboolean valid);
See gfls_validated_string_chunk_get_valid() for the semantics of the valid
value.
Since: 0.5