MCPcopy Create free account

hub / github.com/KaisenAmin/c_std / functions

Functions2,651 in github.com/KaisenAmin/c_std

Functionencoding_utf16_to_utf32
* @brief Converts a UTF-16 encoded string to a UTF-32 encoded string. * * This function converts a string from UTF-16 encoding to UTF-32 encoding.
encoding/encoding.c:1347
Functionencoding_utf32_to_utf16
* @brief Converts a UTF-32 encoded string to a UTF-16 encoded string. * * This function converts a string from UTF-32 encoding to UTF-16 encoding.
encoding/encoding.c:1287
Functionencoding_utf32_to_utf8
* @brief Converts a UTF-32 encoded string to a UTF-8 encoded string. * * This function converts a string from UTF-32 encoding to UTF-8 encoding. *
encoding/encoding.c:1467
Functioneval_expr_error_message
* Returns a descriptive error message corresponding to an error code. * * @param error An error code (one of EVAL_EXPR_SUCCESS, EVAL_EXPR_ERROR_TOKE
evalexpr/evalexpr.c:664
Functioneval_expr_free_tokens
* Frees the token-string array returned by eval_expr_tokenize(). * * The matching deallocator for eval_expr_tokenize(): it frees each individual *
evalexpr/evalexpr.c:792
Functioneval_expr_is_valid
* Checks whether an arithmetic expression is syntactically valid. * * This function tokenizes and converts the expression into RPN. * * @param exp
evalexpr/evalexpr.c:632
Functioneval_expr_print_debug
* Prints detailed debug information for an arithmetic expression. * * This function tokenizes the given expression, prints the tokens, * converts t
evalexpr/evalexpr.c:814
Functioneval_expr_strict
* Evaluates an arithmetic expression and returns an error code. * * This function works like eval_expr() but also sets an error code. * On success,
evalexpr/evalexpr.c:429
Functioneval_expr_to_rpn_string
* Converts an arithmetic expression from infix notation to a string in Reverse Polish Notation (RPN). * * The returned string is dynamically allocat
evalexpr/evalexpr.c:565
Functioneval_expr_tokenize
* Tokenizes an arithmetic expression and returns an array of strings representing each token. * * For a number token, the string will be the number
evalexpr/evalexpr.c:701
Functioneval_expr_with_vars
* Evaluates an arithmetic expression that may reference named variables. * * Works exactly like eval_expr_strict(), but the expression may also cont
evalexpr/evalexpr.c:506
Functionezxml_set_attr
Sets the given tag attribute or adds a new attribute if not found. A value of NULL will remove the specified attribute. Returns the tag given.
xml/xml.c:1069
Functionezxml_set_txt
sets the character content for the given tag and returns the tag
xml/xml.c:1052
Functionfile_reader_copy
* @brief Copies the contents of one file to another. * * This function copies the contents of the source file associated with the `FileReader` to th
file_io/file_reader.c:567
Functionfile_reader_get_file_name
* @brief Retrieves the absolute path of the file associated with the `FileReader`. * * This function returns the absolute path of the file associate
file_io/file_reader.c:219
Functionfile_reader_read_fmt
* @brief Reads formatted data from the file. * * This function reads formatted data from the file associated with the `FileReader`. * * @param rea
file_io/file_reader.c:526
Functionfile_reader_read_lines
* @brief Reads multiple lines of text from the file. * * This function reads a specified number of lines from the file associated with the `FileRead
file_io/file_reader.c:655
Functionfile_reader_seek
* @brief Moves the file pointer to a specific location. * * This function moves the file pointer to a specific location in the file for random acces
file_io/file_reader.c:245
Functionfile_reader_set_encoding
* @brief Sets the encoding for reading the file. * * This function sets the encoding type for reading the file associated with the `FileReader`. *
file_io/file_reader.c:194
Functionfile_writer_append
* @brief Opens an existing file for appending. If the file does not exist, it will be created. * * This function opens a file for appending accordin
file_io/file_writer.c:132
Functionfile_writer_append_fmt
* @brief Appends formatted text to a file using the specified `FileWriter`. * * This function formats a string according to the specified format str
file_io/file_writer.c:1152
Functionfile_writer_copy
* @brief Copies the content from one file to another. * * This function copies the entire content of the file managed by the `src_writer` to the fil
file_io/file_writer.c:538
Functionfile_writer_get_encoding
* @brief Retrieves the encoding type currently set in the `FileWriter`. * * This function returns the encoding type used by the `FileWriter` object,
file_io/file_writer.c:725
Functionfile_writer_get_file_name
* @brief Retrieves the absolute path of the file associated with the `FileWriter` object. * * This function returns the absolute file path that the
file_io/file_writer.c:701
Functionfile_writer_lock
* @brief Locks the file associated with the `FileWriter` to prevent other processes from modifying it. * * This function locks the file to ensure ex
file_io/file_writer.c:837
Functionfile_writer_seek
* @brief Moves the file pointer to a specific location for random access writing. * * This function allows the file pointer to be moved to a specifi
file_io/file_writer.c:922
Functionfile_writer_set_encoding
* @brief Sets the character encoding for writing to the file. * * This function configures the `FileWriter` to use the specified encoding type for w
file_io/file_writer.c:512
Functionfile_writer_truncate
* @brief Truncates the file associated with the `FileWriter` to the specified size. * * This function shortens the file to the given size. If the si
file_io/file_writer.c:967
Functionfile_writer_unlock
* @brief Unlocks the file associated with the `FileWriter` after operations are completed. * * This function releases the lock on the file, allowing
file_io/file_writer.c:877
Functionfile_writer_write_all_atomic
* @brief Atomically write `size` bytes to `path` (crash-safe replace). * * Writes the data to a temporary file in the SAME directory, flushes it to
file_io/file_writer.c:599
Functionfile_writer_write_batch
* @brief Writes multiple buffers to a file in a single operation, potentially optimizing I/O operations. * * This function allows writing multiple b
file_io/file_writer.c:1012
Functionfile_writer_write_line
* @brief Writes a line of text to the file using the specified `FileWriter`. * * This function writes a line of text to the file, with special handl
file_io/file_writer.c:390
Functionfmt_fprintf
* @brief Outputs formatted text to the given file stream. * * This function behaves similarly to `fprintf` but is part of the custom formatting libr
fmt/fmt.c:577
Functionfmt_fscan
* @brief Scans formatted input from a file stream. * * This function reads formatted input from the specified file stream * based on the provided f
fmt/fmt.c:609
Functionfmt_fscanf
* @brief Scans formatted input from a file stream. * * This function reads formatted input from the specified file stream * based on the provided f
fmt/fmt.c:670
Functionfmt_fscanln
* @brief Scans formatted input from a file stream, reading one line at a time. * * This function reads a single line of input from the specified fil
fmt/fmt.c:637
Functionfmt_printf
* @brief Prints a formatted string to the standard output. * * This function prints a formatted string to the standard output (stdout). It works sim
fmt/fmt.c:104
Functionfmt_scan
* @brief Scans a string from standard input until space, newline, or EOF. * * This function reads input from standard input character by character,
fmt/fmt.c:384
Functionfmt_scanf
* @brief Scans formatted input from the standard input. * * This function reads input from the standard input according to the specified format, *
fmt/fmt.c:475
Functionfmt_scanln
* @brief Reads a line of input from the standard input until a newline or space. * * This function reads a line from standard input, stopping at a n
fmt/fmt.c:426
Functionfmt_sprintf
* @brief Formats a string and returns it as a dynamically allocated string. * * This function formats a string according to the specified format str
fmt/fmt.c:347
Functionforward_list_assign
* @brief Assigns new values to the ForwardList, replacing its current contents. * * This function replaces the current contents of the `list` with `
forward_list/forward_list.c:333
Functionforward_list_before_begin
* @brief Returns a pointer to the node before the beginning of the ForwardList. * * This function returns a pointer to the node before the beginning
forward_list/forward_list.c:364
Functionforward_list_begin
* @brief Returns a pointer to the first node in the ForwardList. * * This function returns a pointer to the first node (head) in the `list`. * * @
forward_list/forward_list.c:386
Functionforward_list_create
* @brief Creates a new ForwardList. * * This function allocates memory for a new ForwardList structure and initializes it. * The list is created to
forward_list/forward_list.c:25
Functionforward_list_deallocate
* @brief Deallocates the memory associated with the ForwardList. * * This function deallocates all the memory associated with the `list`, including
forward_list/forward_list.c:308
Functionforward_list_emplace_after
* @brief Inserts a new element after the specified position in the ForwardList. * * This function creates a new node and places it immediately afte
forward_list/forward_list.c:493
Functionforward_list_empty
* @brief Checks whether the ForwardList is empty. * * This function returns `true` if the `list` is empty (i.e., contains no elements), * otherwise
forward_list/forward_list.c:271
Functionforward_list_end
* @brief Returns a pointer to the end of the ForwardList. * * This function returns `NULL` to represent the end of the `list`, as the end of a singl
forward_list/forward_list.c:406
Functionforward_list_erase_after
* @brief Inserts one or more elements into the ForwardList after the specified position. * * This function inserts `numValues` elements into the `li
forward_list/forward_list.c:600
Functionforward_list_front
* @brief Retrieves the first element of the ForwardList. * * This function returns a pointer to the value stored in the first node of the `list`. *
forward_list/forward_list.c:216
Functionforward_list_insert_after
* @brief Inserts one or more elements into the ForwardList after the specified position. * * This function inserts `numValues` elements into the `li
forward_list/forward_list.c:540
Functionforward_list_is_greater_or_equal
* @brief Compares two ForwardLists to determine if the first list is lexicographically greater than or equal to the second. * * This function check
forward_list/forward_list.c:1152
Functionforward_list_is_less_or_equal
* @brief Compares two ForwardLists to determine if the first list is lexicographically less than or equal to the second. * * This function checks i
forward_list/forward_list.c:1128
Functionforward_list_is_not_equal
* @brief Compares two ForwardLists to determine if they are not equal. * * This function checks if the elements in `list1` are not equal to those i
forward_list/forward_list.c:1174
Functionforward_list_length
* @brief Returns the number of elements in the ForwardList. * * This function returns the size of the `list`, representing the number of elements *
forward_list/forward_list.c:290
Functionforward_list_max_size
* @brief Returns a pointer to the end of the ForwardList. * * This function returns `NULL` to represent the end of the `list`, as the end of a singl
forward_list/forward_list.c:426
Functionforward_list_merge
* @brief Merges two sorted ForwardLists into a single sorted list. * * This function takes two sorted ForwardLists, `list1` and `list2`, and merges
forward_list/forward_list.c:921
Functionforward_list_remove
* @brief Removes all elements equal to the specified value from the ForwardList. * * This function iterates through the ForwardList and removes all
forward_list/forward_list.c:789
Functionforward_list_remove_if
* @brief Removes all elements that satisfy the specified condition from the ForwardList. * * This function iterates through the ForwardList and rem
forward_list/forward_list.c:835
Functionforward_list_resize
* @brief Resizes the ForwardList to the specified size. * * This function resizes the `list` to contain `newSize` elements. If the current size of t
forward_list/forward_list.c:665
Functionforward_list_sort
* @brief Sorts the elements of the ForwardList in ascending order. * * This function sorts the elements of the ForwardList using the merge sort alg
forward_list/forward_list.c:972
Functionforward_list_splice_after
* @brief Splices the elements from another ForwardList into this list after the specified position. * * This function moves all elements from the `
forward_list/forward_list.c:725
Functionforward_list_swap
* @brief Swaps the contents of two ForwardLists. * * This function swaps the contents (nodes and sizes) of the two ForwardLists, `list1` and `list2`
forward_list/forward_list.c:637
Functionforward_list_unique
* @brief Removes consecutive duplicate elements from the ForwardList. * * This function iterates through the ForwardList and removes consecutive el
forward_list/forward_list.c:879
Functionhashmap_begin_bucket
* @brief Iterator pointing at the first entry in @p bucket_index. * * On bad arg / OOR returns `hashmap_end`. */
hashmap/hashmap.c:1066
Functionhashmap_bucket
* @brief Bucket index a key would land in. * * Useful when working with `hashmap_begin_bucket` / * `hashmap_end_bucket` to iterate a single chain.
hashmap/hashmap.c:1049
Functionhashmap_bucket_count
* @brief Current bucket-array length (always a prime). * @return Bucket count, or 0 if @p map is NULL. */
hashmap/hashmap.c:507
Functionhashmap_bucket_size
* @brief Number of entries in a single bucket. * * Useful for measuring hash distribution. The bucket head is a * sentinel — only the chain (`.next
hashmap/hashmap.c:539
Functionhashmap_cbegin
* @brief Const variant of `hashmap_begin`. Currently identical — kept * for STL-style API symmetry. */
hashmap/hashmap.c:664
Functionhashmap_cend
* @brief Const variant of `hashmap_end`. */
hashmap/hashmap.c:673
Functionhashmap_clear
* @brief Remove every entry without releasing the bucket array. * * Iterates every bucket chain, calling the configured deallocators * on each node
hashmap/hashmap.c:1028
Functionhashmap_compare_int
* @brief Default comparator for `int*` keys. * * Three-way comparison (-1 / 0 / +1) over `*(int*)key1` vs * `*(int*)key2`. Both NULL compare equal;
hashmap/hashmap.c:294
Functionhashmap_compare_pointer
* @brief Default comparator for raw pointer keys. * * Three-way comparison over the address values themselves. */
hashmap/hashmap.c:356
Functionhashmap_compare_string
* @brief Default comparator for C-string keys. * * Thin wrapper over `strcmp`. Both NULL compare equal; only one NULL * compares less. */
hashmap/hashmap.c:331
Functionhashmap_contains
* @brief Convenience: `hashmap_count(map, key) > 0`. */
hashmap/hashmap.c:900
Functionhashmap_copy
* @brief Shallow copy: clone the bucket layout and re-insert every * (key, value) pair — without copying the underlying key/value * me
hashmap/hashmap.c:1391
Functionhashmap_create
* @brief Create a HashMap with the default initial bucket count * (`DEFAULT_BUCKET_COUNT` = 16, rounded up to the next prime). * * @param ha
hashmap/hashmap.c:395
Functionhashmap_deallocate
* @brief Release every node, the bucket array, and the map struct itself. * * Calls the configured `dealloc_key` / `dealloc_value` on every entry *
hashmap/hashmap.c:464
Functionhashmap_emplace
* @brief Alias for `hashmap_insert` — kept for STL-style symmetry. * * In the absence of move-semantics, "emplace" and "insert" behave * identicall
hashmap/hashmap.c:973
Functionhashmap_empty
* @brief Is the map empty? * @return `true` if the map is NULL or has 0 entries. */
hashmap/hashmap.c:481
Functionhashmap_end_bucket
* @brief Past-the-end iterator for a single bucket — same shape as * `hashmap_end` but with a non-zero bucket_index. */
hashmap/hashmap.c:1086
Functionhashmap_erase
* @brief Remove the entry with the given @p key. * * If the key exists: the matching node is unlinked, its key and value * are freed via the config
hashmap/hashmap.c:987
Functionhashmap_find
* @brief Find an entry by key. * * @return Iterator pointing at the entry, or `hashmap_end(map)` if * the key is absent / any argument is N
hashmap/hashmap.c:857
Functionhashmap_hash_function
* @brief Configured hash function. * @return Function pointer, or NULL if @p map is NULL. */
hashmap/hashmap.c:1237
Functionhashmap_hash_int
* @brief Default hash function for `int*` keys. * * Reinterprets the int value as a `size_t` — fine for non-adversarial * inputs, but trivially col
hashmap/hashmap.c:232
Functionhashmap_hash_pointer
* @brief Default hash function for raw pointer keys (identity). * * Returns the pointer reinterpreted as `size_t` — uses the address * itself as th
hashmap/hashmap.c:278
Functionhashmap_hash_string
* @brief Default hash function for null-terminated C strings (djb2). * * Implements djb2: `hash = hash * 33 + c` starting from 5381. Decent * distr
hashmap/hashmap.c:252
Functionhashmap_iterator_decrement
* @brief Step the iterator backwards. * * Walks the bucket chain to find the predecessor of the current node; * if the current node is the head of
hashmap/hashmap.c:734
Functionhashmap_key_eq
* @brief Configured key-equality comparator. * @return Function pointer, or NULL if @p map is NULL. */
hashmap/hashmap.c:1252
Functionhashmap_max_bucket_count
* @brief Theoretical maximum number of buckets the map could allocate. * @return `SIZE_MAX / sizeof(HashMapNode)`, or 0 if @p map is NULL. */
hashmap/hashmap.c:520
Functionhashmap_max_load_factor_set
* @brief Change the rehash threshold. * * The value is stored as a numerator / denominator pair (millis), so * non-trivial floats are preserved wit
hashmap/hashmap.c:1147
Functionhashmap_not_equal
* @brief Logical negation of `hashmap_equal`. */
hashmap/hashmap.c:1305
Functionhashmap_operator_bracket
* @brief Lookup-or-insert: returns the current value for @p key, or * creates a new entry with value `NULL` and returns NULL. * * Analogous
hashmap/hashmap.c:597
Functionhashmap_print
* @brief Print a map's contents in a `(key -> value)` format. * * If a print callback is NULL, the raw pointer value is printed in * `%p` form. Use
hashmap/hashmap.c:1341
Functionhashmap_reserve
* @brief Resize the bucket array so it can hold @p count entries * without exceeding the configured max load factor. * * If the existing arr
hashmap/hashmap.c:1215
Functionhashmap_size
* @brief Number of entries currently stored. * @return Entry count, or 0 if @p map is NULL. */
hashmap/hashmap.c:494
Functionhashmap_swap
* @brief Swap the contents of two maps (struct-by-struct value copy). * * O(1) — internal pointers are exchanged; no node-level work. * NULL on eit
hashmap/hashmap.c:1318
Functionhp_ignore_sigpipe
network/http.c:76
Functionhp_srv_lock_init
network/http.c:69
← previousnext →1,301–1,400 of 2,651, ranked by callers