|
cwist
Modern C web framework with libttak runtime
|
#include <sstring.h>

Public Attributes | |
| char * | data |
| Access directly only when raw handling is necessary. | |
| bool | is_fixed |
| bool | owns_storage |
| bool | borrows_buffer |
| data is borrowed (static/arena); never freed, detached on mutation | |
| size_t | size |
| size_t | capacity |
| char * | base |
| size_t(* | get_size )(struct cwist_sstring *str) |
| int(* | compare )(struct cwist_sstring *left, const struct cwist_sstring *right) |
Should mimic strcmp, internally use strncmp. | |
| cwist_error_t(* | copy )(struct cwist_sstring *str, const struct cwist_sstring *from) |
| cwist_error_t(* | append )(struct cwist_sstring *str, const struct cwist_sstring *from) |
| Append another sstring. | |
| cwist_error_t(* cwist_sstring::append)(struct cwist_sstring *str, const struct cwist_sstring *from) |
Append another sstring.
Definition at line 35 of file sstring.h.
Referenced by cwist_sstring_create(), cwist_sstring_destroy(), cwist_sstring_init(), and cwist_sstring_init_escaped().
| char * cwist_sstring::base |
Allocation base when data views a region inside it (NULL means data is the base). Freed on destroy.
Definition at line 24 of file sstring.h.
Referenced by cwist_sstring_adopt_len(), cwist_sstring_adopt_region(), cwist_sstring_borrow(), cwist_sstring_destroy(), cwist_sstring_init(), cwist_sstring_init_escaped(), and cwist_sstring_substr().
| bool cwist_sstring::borrows_buffer |
data is borrowed (static/arena); never freed, detached on mutation
data points at storage owned elsewhere (static/arena); never freed or realloc'd in place
Definition at line 18 of file sstring.h.
Referenced by cwist_sstring_adopt_len(), cwist_sstring_adopt_region(), cwist_sstring_append(), cwist_sstring_append_escaped(), cwist_sstring_append_len(), cwist_sstring_assign(), cwist_sstring_assign_len(), cwist_sstring_borrow(), cwist_sstring_change_size(), cwist_sstring_destroy(), cwist_sstring_init(), cwist_sstring_init_escaped(), cwist_sstring_ltrim(), and cwist_sstring_rtrim().
| size_t cwist_sstring::capacity |
Payload bytes the current data buffer can hold, excluding the NUL; 0 means unknown, in which case growth falls back to exact-fit reallocation.
Definition at line 21 of file sstring.h.
Referenced by cwist_sstring_adopt_len(), cwist_sstring_adopt_region(), cwist_sstring_borrow(), cwist_sstring_destroy(), cwist_sstring_init(), cwist_sstring_init_escaped(), and cwist_sstring_substr().
| int(* cwist_sstring::compare)(struct cwist_sstring *left, const struct cwist_sstring *right) |
Should mimic strcmp, internally use strncmp.
should mimic strcmp, internally use strncmp
Definition at line 27 of file sstring.h.
Referenced by cwist_sstring_create(), cwist_sstring_destroy(), cwist_sstring_init(), and cwist_sstring_init_escaped().
| cwist_error_t(* cwist_sstring::copy)(struct cwist_sstring *str, const struct cwist_sstring *from) |
Definition at line 30 of file sstring.h.
Referenced by cwist_sstring_create(), cwist_sstring_destroy(), cwist_sstring_init(), and cwist_sstring_init_escaped().
| char * cwist_sstring::data |
Access directly only when raw handling is necessary.
please access this data if raw handling is necessary
Definition at line 15 of file sstring.h.
Referenced by cwist_app_dispatch_stream(), cwist_app_req_bind_form(), cwist_app_req_bind_json(), cwist_assets_match(), cwist_css_bundle(), cwist_css_generate_stylesheet(), cwist_graphql_serve(), cwist_html_element_add_class(), cwist_http2_push_resource(), cwist_http_async_send_response(), cwist_http_client_request(), cwist_http_header_get(), cwist_http_header_remove(), cwist_http_response_add_oob(), cwist_http_response_serialize(), cwist_http_send_response(), cwist_http_send_response_async(), cwist_http_send_response_coalesced(), cwist_http_stringify_response(), cwist_https_send_response(), cwist_json_get_raw(), cwist_mux_serve(), cwist_sse_response_comment(), cwist_sse_response_event(), cwist_sstring_adopt_len(), cwist_sstring_adopt_region(), cwist_sstring_append(), cwist_sstring_append_escaped(), cwist_sstring_append_len(), cwist_sstring_append_sstring(), cwist_sstring_append_sstring_escaped(), cwist_sstring_assign(), cwist_sstring_assign_len(), cwist_sstring_borrow(), cwist_sstring_change_size(), cwist_sstring_create(), cwist_sstring_destroy(), cwist_sstring_init(), cwist_sstring_init_escaped(), cwist_sstring_ltrim(), cwist_sstring_rtrim(), cwist_sstring_seek(), cwist_sstring_substr(), and cwist_url_for().
| size_t(* cwist_sstring::get_size)(struct cwist_sstring *str) |
Definition at line 26 of file sstring.h.
Referenced by cwist_sstring_create(), cwist_sstring_destroy(), cwist_sstring_init(), and cwist_sstring_init_escaped().
| bool cwist_sstring::is_fixed |
Definition at line 16 of file sstring.h.
Referenced by cwist_sstring_append(), cwist_sstring_append_escaped(), cwist_sstring_assign(), cwist_sstring_borrow(), cwist_sstring_change_size(), cwist_sstring_create(), cwist_sstring_init(), and cwist_sstring_init_escaped().
| bool cwist_sstring::owns_storage |
Definition at line 17 of file sstring.h.
Referenced by cwist_sstring_create(), cwist_sstring_destroy(), cwist_sstring_init(), and cwist_sstring_init_escaped().
| size_t cwist_sstring::size |
Definition at line 20 of file sstring.h.
Referenced by cwist_app_dispatch_stream(), cwist_graphql_serve(), cwist_http_async_send_response(), cwist_http_response_serialize(), cwist_http_response_stream_begin(), cwist_http_send_response(), cwist_http_send_response_async(), cwist_http_send_response_coalesced(), cwist_http_stringify_response(), cwist_https_send_response(), cwist_sstring_adopt_len(), cwist_sstring_adopt_region(), cwist_sstring_append(), cwist_sstring_append_escaped(), cwist_sstring_append_len(), cwist_sstring_assign(), cwist_sstring_assign_len(), cwist_sstring_borrow(), cwist_sstring_change_size(), cwist_sstring_create(), cwist_sstring_destroy(), cwist_sstring_get_size(), cwist_sstring_init(), cwist_sstring_init_escaped(), cwist_sstring_ltrim(), cwist_sstring_rtrim(), and cwist_sstring_substr().