Adaptive Framework
0.9.0
|
AFW String functions. More...
#include "afw_minimal.h"
Go to the source code of this file.
Macros | |
#define | afw_utf8_is_valid(s, len, xctx) |
Determine if series of bytes is valid utf-8. More... | |
#define | afw_utf8_is_nfc(s, len, p, xctx) |
Determine if series of bytes is NFC normalized utf-8. More... | |
#define | afw_utf8_create(s, len, p, xctx) afw_utf8_nfc(s, len, afw_utf8_nfc_option_create, p, xctx) |
Create utf-8 string without copy unless necessary in pool specified. More... | |
#define | afw_utf8_from_utf8_z(s_z, p, xctx) |
Make utf-8 string without copy in specified pool. More... | |
#define | afw_utf8_create_copy(s, len, p, xctx) afw_utf8_nfc(s, len, afw_utf8_nfc_option_create_copy, p, xctx) |
Make a utf-8 sting from chars in pool specified. More... | |
Typedefs | |
typedef const afw_utf8_t *(AFW_CALLBACK * | afw_utf8_from_value_t) (const afw_value_t *value, afw_boolean_t own, afw_xctx_t *xctx) |
Callback function for creating a string from an adaptive value. More... | |
typedef const afw_value_t *(AFW_CALLBACK * | afw_utf8_to_value_t) (const afw_utf8_t *from_utf8, const afw_utf8_t *path, afw_xctx_t *xctx) |
Callback function for converting a string to an adaptive value. More... | |
typedef enum afw_utf8_nfc_option_e | afw_utf8_nfc_option_t |
Enumerations | |
enum | afw_utf8_nfc_option_e { afw_utf8_nfc_option_is_valid , afw_utf8_nfc_option_is_nfc , afw_utf8_nfc_option_create , afw_utf8_nfc_option_create_copy } |
Functions | |
const afw_utf8_t * | afw_utf8_nfc (const afw_utf8_octet_t *s, afw_size_t len, afw_utf8_nfc_option_t option, const afw_pool_t *p, afw_xctx_t *xctx) |
UTF-8 NFC support function. More... | |
afw_code_point_t | afw_utf8_next_code_point (const afw_utf8_octet_t *s, afw_size_t *offset, afw_size_t len, afw_xctx_t *xctx) |
Get next codepoint in utf-8. More... | |
afw_boolean_t | afw_utf8_from_code_point (afw_utf8_octet_t utf8_z[5], afw_code_point_t cp, afw_xctx_t *xctx) |
Convert a code point to utf8. More... | |
const afw_memory_t * | afw_utf8_as_raw (const afw_utf8_t *string, const afw_pool_t *p, afw_xctx_t *xctx) |
Convert utf-8 string to raw in specified pool. More... | |
const afw_utf8_t * | afw_utf8_from_raw (const afw_memory_t *raw, const afw_pool_t *p, afw_xctx_t *xctx) |
Convert raw to a utf-8 NFC normalizing if necessary in specified pool. More... | |
const afw_utf8_t * | afw_utf8_from_encoding (const afw_utf8_t *from_encoding, const char **from, afw_size_t *from_size, const afw_pool_t *p, afw_xctx_t *xctx) |
Convert character encoding to a utf-8 in specified pool. More... | |
const afw_utf8_t *const * | afw_utf8_clone_pointer_array (afw_size_t count, const afw_utf8_t *const *pointers, afw_boolean_t NULL_terminate, const afw_pool_t *p, afw_xctx_t *xctx) |
Clone a pointer array of utf-8 to specified pool. More... | |
const afw_utf8_t * | afw_utf8_array_to_utf8_with_separator (const afw_utf8_t *const *strings, const afw_utf8_t *separator, const afw_pool_t *p, afw_xctx_t *xctx) |
Concat array of utf-8 with optional separator to specified pool. More... | |
const afw_utf8_z_t * | afw_utf8_array_to_utf8_z_with_separator (const afw_utf8_t *const *strings, const afw_utf8_t *separator, const afw_pool_t *p, afw_xctx_t *xctx) |
Concat array of utf-8 with optional separator to specified pool. More... | |
const afw_utf8_z_t * | afw_utf8_z_array_to_utf8_z_with_separator (const afw_utf8_z_t *const *strings_z, const afw_utf8_t *separator, const afw_pool_t *p, afw_xctx_t *xctx) |
Concat array of utf-8 with optional separator to specified pool. More... | |
const afw_utf8_t * | afw_utf8_clone (const afw_utf8_t *string, const afw_pool_t *p, afw_xctx_t *xctx) |
Clone a utf-8 string into a specific pool. More... | |
const afw_utf8_t * | afw_utf8_to_lower (const afw_utf8_t *s, const afw_pool_t *p, afw_xctx_t *xctx) |
Convert utf-8 sting to lower case in specified pool. More... | |
const afw_utf8_t * | afw_utf8_normalize_space (const afw_utf8_t *s, const afw_pool_t *p, afw_xctx_t *xctx) |
Create a utf-8 sting with spaces normalized in specified pool. More... | |
const afw_utf8_t * | afw_utf8_concat (const afw_pool_t *p, afw_xctx_t *xctx,...) |
Concatenate strings with result in specifed pool. More... | |
const afw_utf8_t * | afw_utf8_concat_v (const afw_pool_t *p, afw_xctx_t *xctx, va_list strings) |
Concatenate strings with result in specifed pool. More... | |
afw_boolean_t | afw_utf8_line_column_of_offset (afw_size_t *line_number, afw_size_t *column_number, const afw_utf8_t *s, afw_size_t offset, int tab_size, afw_xctx_t *xctx) |
Determine the line and column of an offset in a string. More... | |
void | afw_utf8_line_count_and_max_column (afw_size_t *number_of_lines, afw_size_t *max_column_number, const afw_utf8_t *s, int tab_size, afw_xctx_t *xctx) |
Determine the line count and maximum column in a string. More... | |
const afw_utf8_t * | afw_utf8_printf (const afw_pool_t *p, afw_xctx_t *xctx, const afw_utf8_z_t *format_z,...) |
Create a utf-8 string using a c format string in specified pool. More... | |
const afw_utf8_t * | afw_utf8_printf_v (const afw_utf8_z_t *format, va_list arg, const afw_pool_t *p, afw_xctx_t *xctx) |
Create a utf-8 string using a c format string in specified pool. More... | |
const afw_utf8_z_t * | afw_utf8_to_utf8_z (const afw_utf8_t *string, const afw_pool_t *p, afw_xctx_t *xctx) |
Convert utf8 to utf8_z in specified pool. More... | |
afw_boolean_t | afw_utf8_starts_with (const afw_utf8_t *string, const afw_utf8_t *starts_with) |
Check to see if a string starts with another string. More... | |
afw_boolean_t | afw_utf8_starts_with_z (const afw_utf8_t *string, const afw_utf8_z_t *starts_with_z) |
Check to see if a string starts with a utf8_z string. More... | |
afw_boolean_t | afw_utf8_ends_with (const afw_utf8_t *string, const afw_utf8_t *ends_with) |
Check to see if a string ends with another string. More... | |
afw_boolean_t | afw_utf8_ends_with_z (const afw_utf8_t *string, const afw_utf8_z_t *ends_with_z) |
Check to see if a string ends with a utf8_z string. More... | |
afw_boolean_t | afw_utf8_equal (const afw_utf8_t *s1, const afw_utf8_t *s2) |
Check to see if a string equals another string. More... | |
afw_boolean_t | afw_utf8_contains (const afw_utf8_t *s1, const afw_utf8_t *s2) |
Check to see if a string contains another string. More... | |
int | afw_utf8_compare (const afw_utf8_t *s1, const afw_utf8_t *s2) |
Compare two strings. More... | |
int | afw_utf8_compare_ignore_case (const afw_utf8_t *s1, const afw_utf8_t *s2, afw_xctx_t *xctx) |
Compare two strings ignoring case. More... | |
afw_boolean_t | afw_utf8_equal_utf8_z (const afw_utf8_t *s1, const afw_utf8_z_t *s2_z) |
Check to see if a string equals a utf8_z string. More... | |
const afw_utf8_t *const * | afw_utf8_parse_csv (const afw_utf8_t *s, const afw_pool_t *p, afw_xctx_t *xctx) |
Check to see if a string equals a utf8_z string. More... | |
void | afw_utf8_substring_byte (afw_utf8_t *result, const afw_utf8_t *string, afw_size_t start, afw_size_t end) |
Set result to a substring of string using byte indexes. More... | |
const afw_utf8_z_t * | afw_utf8_z_create (const afw_utf8_octet_t *s, afw_size_t len, const afw_pool_t *p, afw_xctx_t *xctx) |
Create a NFC Normalized zero terminated UTF-8 string in specified pool. More... | |
afw_boolean_t | afw_utf8_len_starts_with_z (const afw_utf8_octet_t *s1, afw_size_t len1, const afw_utf8_z_t *s2_z) |
Returns true if series of bytes for len s1 starts with zero terminated string s2. More... | |
afw_boolean_t | afw_utf8_z_starts_with_z (const afw_utf8_z_t *s1_z, const afw_utf8_z_t *s2_z) |
Returns true if zero terminated s1 starts with zero terminated string s2. More... | |
int | afw_utf8_z_compare_ignore_case (const afw_utf8_z_t *s1, const afw_utf8_z_t *s2, afw_xctx_t *xctx) |
Compare two zero terminated utf-8 strings ignoring case. | |
afw_boolean_t | afw_utf8_z_equal (const afw_utf8_z_t *s1, const afw_utf8_z_t *s2) |
afw_boolean_t | afw_utf8_z_equal_ignore_case (const afw_utf8_z_t *s1, const afw_utf8_z_t *s2) |
const afw_utf8_z_t * | afw_utf8_z_concat (const afw_pool_t *p, afw_xctx_t *xctx,...) |
const afw_object_t * | afw_utf8_z_query_string_to_object (const afw_utf8_z_t *s, afw_xctx_t *xctx) |
const afw_utf8_z_t * | afw_utf8_z_printf_v (const afw_utf8_z_t *format_z, va_list ap, const afw_pool_t *p, afw_xctx_t *xctx) |
const afw_utf8_z_t * | afw_utf8_z_printf (const afw_pool_t *p, afw_xctx_t *xctx, const afw_utf8_z_t *format_z,...) |
const afw_utf8_z_t * | afw_utf8_z_file_name_from_path (const afw_utf8_z_t *path_z) |
const afw_utf8_z_t * | afw_utf8_z_source_file (const afw_utf8_z_t *source_z) |
Returns value of source_z after last '/ 'or '\'. More... | |
const afw_stream_t * | afw_utf8_stream_create (const afw_utf8_t *streamId, const afw_pool_t *p, afw_xctx_t *xctx) |
Create UTF-8 stream. More... | |
const afw_writer_t * | afw_utf8_writer_create (const afw_utf8_t *tab, const afw_pool_t *p, afw_xctx_t *xctx) |
Create UTF-8 writer. More... | |
void | afw_utf8_stream_get_current_cached_string (const afw_stream_t *stream, afw_utf8_t *current_cached_string, afw_xctx_t *xctx) |
Get the current string in a UTF-8 writer. More... | |
void | afw_utf8_writer_current_string (const afw_writer_t *writer, afw_utf8_t *current_string, afw_xctx_t *xctx) |
Get the current string in a UTF-8 writer. More... | |
AFW String functions.
This is the header file for AFW String functions.
Definition in file afw_utf8.h.