Macro

BitVecByteSize

BitVecByteSize Description Get u64 of bitvector in bytes. This returns the actual memory used by the bit data.

Read More

BitVecCapacity

BitVecCapacity Description Get capacity of bitvector in bits.

Read More

BitVecEmpty

BitVecEmpty Description Check if bitvector is empty.

Read More

Scope

Scope Description Run a scoped block and automatically deinitialize the object at the end. Executes scope_body and ensures obj_deinit(obj) is called afterward, regardless of the block’s control flow. This is similar to RAII-style resource management in C++ but implemented manually via a macro. The object is passed by pointer. It is not copied or moved. This macro ensures the object is only evaluated once by capturing it internally using TYPE_OF. The memory pointed to by obj is not cleared after deinitialization; if zeroing is needed, do it inside obj_deinit. Parameters:

Read More

ValidateVec

ValidateVec Description Validate whether a given Vec object is valid. Not foolproof but will work most of the time. Aborts if provided Vec is not valid.

Read More

VecAlignedOffsetAt

VecAlignedOffsetAt Description Vector implementation already manages alignment for stored objects. It makes sure that objects of improper size are stored at alignment of 8 bytes each to avoid UB.

Read More

VecAt

VecAt Description Value at given index in a vector. It’s strongly recommended to always use this instead of directly accessing the data.

Read More

VecBegin

VecBegin Description Pointer to first element in vector

Read More

VecClear

VecClear Description Clear vec contents.

Read More

VecDeinit

VecDeinit Description Deinit vec by freeing all allocations.

Read More

VecDelete

VecDelete Description Delete item at given index

Read More

VecDeleteFast

VecDeleteFast Description Delete item at given index using faster implementation. Order preservation is not guaranteed

Read More

VecDeleteLast

VecDeleteLast Description Delete last item from vec

Read More

VecDeleteRange

VecDeleteRange Description Delete items in given range [start, start + count)

Read More

VecDeleteRangeFast

VecDeleteRangeFast Description Delete items in given range [start, start + count) using faster implementation. Order preservation is not guaranteed

Read More

VecEnd

VecEnd Description Pointer at the end (after last element) of vector

Read More

VecFirst

VecFirst Description Value of first element in vector.

Read More

VecForeach

VecForeach Description Iterate over each element var of the given vector v. This is a convenience macro that iterates forward using an internally managed index. The variable var is declared and defined by this macro.

Read More

VecForeachIdx

VecForeachIdx Description Iterate over each element var of given vector v at each index idx into the vector. The variables var and idx declared and defined by this macro. idx will start from 0 and will go till v->length - 1

Read More

VecForeachInRange

VecForeachInRange Description Iterate over elements in a specific range of the given vector v. This is a convenience macro that iterates over a range using an internally managed index. The variable var is declared and defined by this macro.

Read More

VecForeachInRangeIdx

VecForeachInRangeIdx Description Iterate over elements in a specific range of the given vector v at each index idx. The variables var and idx are declared and defined by this macro. idx will start from start and will go till end - 1

Read More

VecForeachPtr

VecForeachPtr Description Iterate over each element var of the given vector v (as a pointer). This is a convenience macro that iterates forward using an internally managed index and provides a pointer to each element. The variable var is declared and defined by this macro as a pointer to the vector’s data type.

Read More

VecForeachPtrIdx

VecForeachPtrIdx Description Iterate over each element var of given vector v at each index idx into the vector. The variables var and idx declared and defined by this macro. idx will start from 0 and will go till v->length - 1

Read More

VecForeachPtrInRange

VecForeachPtrInRange Description Iterate over elements in a specific range of the given vector v (as pointers). This is a convenience macro that iterates over a range using an internally managed index and provides a pointer to each element. The variable var is declared and defined by this macro as a pointer to the vector’s data type.

Read More

VecForeachPtrInRangeIdx

VecForeachPtrInRangeIdx Description Iterate over elements in a specific range of the given vector v at each index idx (as pointers). The variables var and idx are declared and defined by this macro. idx will start from start and will go till end - 1

Read More

VecForeachPtrReverse

VecForeachPtrReverse Description Iterate over each element var (as a pointer) of the given vector v in reverse order. This is a convenience macro that iterates backward using an internally managed index and provides a pointer to each element. The variable var is declared and defined by this macro as a pointer to the vector’s data type.

Read More

VecForeachPtrReverseIdx

VecForeachPtrReverseIdx Description Iterate over each element var of given vector v at each index idx into the vector. The variables var and idx declared and defined by this macro. idx will start from v->length - 1 and will go till 0

Read More

VecForeachReverse

VecForeachReverse Description Iterate over each element var of the given vector v in reverse order. This is a convenience macro that iterates backward using an internally managed index. The variable var is declared and defined by this macro.

Read More

VecForeachReverseIdx

VecForeachReverseIdx Description Iterate over each element var of given vector v at each index idx into the vector. The variables var and idx declared and defined by this macro. idx will start from v->length - 1 and will go till 0

Read More

VecInit

VecInit Description Initialize vector. Default alignment is 1 It is mandatory to initialize vectors before use. Not doing so is undefined behaviour.

Read More

VecInitAligned

VecInitAligned Description Initialize vector with given alignment. It is mandatory to initialize vectors before use. Not doing so is undefined behaviour. Provided alignment is used to keep all objects at an aligned memory location, avoiding UB in some cases. It’s recommended to use aligned vector when dealing with structs containing unions.

Read More

VecInitAlignedStack

VecInitAlignedStack Description Initialize given vector with given alignment. It is mandatory to initialize vectors before use. Not doing so is undefined behaviour. Provided alignment is used to keep all objects at an aligned memory location, avoiding UB in some cases. It’s recommended to use aligned vector when dealing with structs containing unions. These vectors are best used where user doesn’t get a chance to or does not want to deinit vector, given that no data in vector needs to be deinitialized. Example includes, but does not limit to a Vec(i8), Vec(f32), etc…

Read More

VecInitAlignedT

VecInitAlignedT Description Initialize given vector with given alignment. It is mandatory to initialize vectors before use. Not doing so is undefined behaviour. Provided alignment is used to keep all objects at an aligned memory location, avoiding UB in some cases. It’s recommended to use aligned vector when dealing with structs containing unions.

Read More

VecInitAlignedWithDeepCopy

VecInitAlignedWithDeepCopy Description Initialize vector with given alignment. It is mandatory to initialize vectors before use. Not doing so is undefined behaviour. Provided alignment is used to keep all objects at an aligned memory location, avoiding UB in some cases. It’s recommended to use aligned vector when dealing with structs containing unions.

Read More

VecInitAlignedWithDeepCopyStack

VecInitAlignedWithDeepCopyStack Description Initialize given vector with given alignment. It is mandatory to initialize vectors before use. Not doing so is undefined behaviour. Provided alignment is used to keep all objects at an aligned memory location, avoiding UB in some cases. It’s recommended to use aligned vector when dealing with structs containing unions. These vectors are best used where user doesn’t get a chance to or does not want to deinit vector, given that no data in vector needs to be deinitialized. Example includes, but does not limit to a Vec(i8), Vec(f32), etc…

Read More

VecInitClone

VecInitClone Description Initialize clone of vector from vs to vd.

Read More

VecInitStack

VecInitStack Description Initialize given vector using memory from stack. Such vectors cannot be dynamically resized. Doing so is UB. It is mandatory to initialize vectors before use. Not doing so is undefined behaviour. These vectors are best used where user doesn’t get a chance to or does not want to deinit vector, given that no data in vector needs to be deinitialized. Example includes, but does not limit to a Vec(i8), Vec(f32), etc… Stack inited vectors mustn’t be deinited after use.

Read More

VecInitT

VecInitT Description Initialize given vector. Default alignment is 1 It is mandatory to initialize vectors before use. Not doing so is undefined behaviour.

Read More

VecInitWithDeepCopy

VecInitWithDeepCopy Description Initialize vector. Default alignment is 1 It is mandatory to initialize vectors before use. Not doing so is undefined behaviour.

Read More

VecInitWithDeepCopyStack

VecInitWithDeepCopyStack Description Initialize given vector using memory from stack. Such vectors cannot be dynamically resized. Doing so is UB. It is mandatory to initialize vectors before use. Not doing so is undefined behaviour. These vectors are best used where user doesn’t get a chance to or does not want to deinit vector, given that no data in vector needs to be deinitialized. Example includes, but does not limit to a Vec(i8), Vec(f32), etc… Stack inited vectors mustn’t be deinited after use.

Read More

VecInitWithDeepCopyT

VecInitWithDeepCopyT Description Initialize given vector. Default alignment is 1 It is mandatory to initialize vectors before use. Not doing so is undefined behaviour.

Read More

VecInsert

VecInsert Description Insert by default behaves like VecInsertL, which is to insert an l-value into vector and then take ownership if vector does not have a copy-init method.

Read More

VecInsertFast

VecInsertFast Description By default this behaves like inserting an l-value using VecInsertFastL

Read More

VecInsertFastL

VecInsertFastL Description Quickly insert item into vector. Ordering of elements is not guaranteed to be preserved. This call makes significant difference only for sufficiently large vectors and when idx is quite less than (v)->length. Insertion time is guaranteed to be constant for same data types. Usage is exactly same as VecInsert, just the internal implementation is different.

Read More

VecInsertFastR

VecInsertFastR Description Quickly insert item into vector. Ordering of elements is not guaranteed to be preserved. This call makes significant difference only for sufficiently large vectors and when idx is quite less than (v)->length. Insertion time is guaranteed to be constant for same data types. Usage is exactly same as VecInsert, just the internal implementation is different.

Read More

VecInsertL

VecInsertL Description Insert an l-value into vector of it’s type. Insertion index must not exceed vector length. This preserves the ordering of elements. Best to be used with sorted vectors, if the sorted property is to be preserved.

Read More

VecInsertR

VecInsertR Description Insert an r-value into vector of it’s type. Insertion index must not exceed vector length. This preserves the ordering of elements. Best to be used with sorted vectors, if the sorted property is to be preserved. In worst case this would to to O(n)

Read More

VecInsertRange

VecInsertRange Description Insert array of items into vector of it’s type. By default, this uses L-value semantics (ownership transfer). Insertion index must not exceed vector length. This preserves the ordering of elements. Best to be used with sorted vectors, if the sorted property is to be preserved.

Read More

VecInsertRangeFast

VecInsertRangeFast Description Quickly insert array of items into vector. By default, this uses L-value semantics (ownership transfer). Ordering of elements is not guaranteed to be preserved. This call makes significant difference only for sufficiently large vectors and when idx is quite less than (v)->length. Insertion time is guaranteed to be constant for same data types.

Read More

VecInsertRangeFastL

VecInsertRangeFastL Description Quickly insert array of items into vector, with L-value semantics. Ordering of elements is not guaranteed to be preserved. This call makes significant difference only for sufficiently large vectors and when idx is quite less than (v)->length. Insertion time is guaranteed to be constant for same data types.

Read More

VecInsertRangeFastR

VecInsertRangeFastR Description Quickly insert array of items into vector, with R-value semantics. Ordering of elements is not guaranteed to be preserved. This call makes significant difference only for sufficiently large vectors and when idx is quite less than (v)->length. Insertion time is guaranteed to be constant for same data types.

Read More

VecInsertRangeL

VecInsertRangeL Description Insert array of items into vector, with L-value semantics. Insertion index must not exceed vector length. This preserves the ordering of elements. Best to be used with sorted vectors, if the sorted property is to be preserved.

Read More

VecInsertRangeR

VecInsertRangeR Description Insert array of items into vector, with R-value semantics. Insertion index must not exceed vector length. This preserves the ordering of elements. Best to be used with sorted vectors, if the sorted property is to be preserved.

Read More

VecLast

VecLast Description Value of last element in vector.

Read More

VecLen

VecLen Description Length of vector.

Read More

VecMerge

VecMerge Description Merge two vectors and store the result in the first vector. Data is copied from v2 into v. If a copy_init method is provided in v, each element from v2 will be copied using that method. Otherwise, a raw memory copy is performed, which may be unsafe for complex or pointer-containing data.

Read More

VecMergeL

VecMergeL Description Merge two vectors and store the result in the first vector, with L-value semantics. Data is copied from v2 into v. If a copy_init method is provided in v, each element from v2 will be copied using that method. Otherwise, a raw memory copy is performed, which may be unsafe for complex or pointer-containing data.

Read More

VecMergeR

VecMergeR Description Merge two vectors and store the result in the first vector, with R-value semantics. Data is copied from v2 into v. If a copy_init method is provided in v, each element from v2 will be copied using that method. Otherwise, a raw memory copy is performed, which may be unsafe for complex or pointer-containing data.

Read More

VecPopBack

VecPopBack Description Pop item from vector back.

Read More

VecPopFront

VecPopFront Description Pop item from vector front.

Read More

VecPtrAt

VecPtrAt Description Value at given index in a vector. It’s strongly recommended to always use this instead of directly accessing the data.

Read More

VecPushBack

VecPushBack Description Push item into vector back. Default behaviour is same as VecPushBackL

Read More

VecPushBackArr

VecPushBackArr Description Push a complete array into this vector. By default, this uses L-value semantics (ownership transfer).

Read More

VecPushBackArrL

VecPushBackArrL Description Push a complete array into this vector, with L-value semantics.

Read More

VecPushBackArrR

VecPushBackArrR Description Push a complete array into this vector, with R-value semantics.

Read More

VecPushBackL

VecPushBackL Description Push an l-value into vector back.

Read More

VecPushBackR

VecPushBackR Description Push item into vector back.

Read More

VecPushFront

VecPushFront Description Push item into vector front.

Read More

VecPushFrontArr

VecPushFrontArr Description Push a complete array into this vector front. By default, this uses L-value semantics (ownership transfer).

Read More

VecPushFrontArrFast

VecPushFrontArrFast Description Push a complete array into this vector front without preserving the order of elements in vector. By default, this uses L-value semantics (ownership transfer).

Read More

VecPushFrontArrFastL

VecPushFrontArrFastL Description Push a complete array into this vector front without preserving the order of elements in vector, with L-value semantics.

Read More

VecPushFrontArrFastR

VecPushFrontArrFastR Description Push a complete array into this vector front without preserving the order of elements in vector, with R-value semantics.

Read More

VecPushFrontArrL

VecPushFrontArrL Description Push a complete array into this vector front, with L-value semantics.

Read More

VecPushFrontArrR

VecPushFrontArrR Description Push a complete array into this vector front, with R-value semantics.

Read More

VecPushFrontL

VecPushFrontL Description Push item into vector front.

Read More

VecPushFrontR

VecPushFrontR Description Push item into vector front.

Read More

VecRemove

VecRemove Description Remove item from vector at given index and store in given pointer. Order of elements is guaranteed to be preserved.

Read More

VecRemoveFast

VecRemoveFast Description Remove item from vector at given index and store in given pointer. Order of elements inside vector is not guaranteed to be preserved. The implementation is faster in some scenarios that VecRemove

Read More

VecRemoveRange

VecRemoveRange Description Remove data from vector in given range [start, start + count) Order of elements is guaranteed to be preserved.

Read More

VecRemoveRangeFast

VecRemoveRangeFast Description Remove item from vector at given index and store in given pointer. Order of elements inside vector is not guaranteed to be preserved. The implementation is faster in some scenarios that VecRemove

Read More

VecReserve

VecReserve Description Reserve space for vector.

Read More

VecResize

VecResize Description Resize vector. If length is smaller than current capacity, vector length is shrinked. If length is greater than current capacity, space is reserved and vector is expanded.

Read More

VecReverse

VecReverse Description Reverse contents of this vector.

Read More

VecSize

VecSize Description Size of vector in bytes. Use this instead of multiplying size of item with vector length!

Read More

VecSort

VecSort Description Sort given vector with given comparator using quicksort algorithm.

Read More

VecSwapItems

VecSwapItems Description Swap items at given indices.

Read More

VecTryReduceSpace

VecTryReduceSpace Description Try reducing memory footprint of vector. This is to be used when we know actual allocated memory for vec is large, and we won’t need it in future, so we can reduce it to whatever’s required at the moment.

Read More

ALIGN_DOWN

ALIGN_DOWN Description Aligns the given value down to the nearest multiple of alignment.

Read More

ALIGN_DOWN_POW2

ALIGN_DOWN_POW2 Description Aligns the given value down to the nearest power-of-two multiple.

Read More

ALIGN_UP

ALIGN_UP Description Aligns the given value up to the nearest multiple of alignment.

Read More

ALIGN_UP_POW2

ALIGN_UP_POW2 Description Aligns the given value up to the nearest power-of-two multiple.

Read More

APPLY_MACRO_FOREACH

APPLY_MACRO_FOREACH Description Expand variadic argument list for given macro for each element one by one. This is a macro trick to apply a given macro on a variadic argument list one by one. The only limitiation here is that we cannot expand more than 256 times for the moment. To make it do more than that, we just need to add one more line to the EXPAND macros Also, if you have more than 20-30 arguments in your format strings, you should seriously consider whether you’re doing something wrong Reference : https://www.scs.stanford.edu/~dm/blog/va-opt.html

Read More

APPLY_MACRO_FOREACH_AGAIN

APPLY_MACRO_FOREACH_AGAIN Description Helper macro to delay evaluation in text generation (pre-processing) phase of macro

Read More

APPLY_MACRO_FOREACH_HELPER

APPLY_MACRO_FOREACH_HELPER Description Helper macro to apply given macro to the very first argument in list of variadic macro arguments Then expands to applying the same macro to more arguments only if there are more

Read More

BitVecForeach

BitVecForeach Description Iterate over each bit var of the given bitvector bv. This is a convenience macro that iterates forward using an internally managed index. The variable var is declared and defined by this macro.

Read More

BitVecForeachIdx

BitVecForeachIdx Description Iterate over each bit var of given bitvector bv at each index idx into the bitvector. The variables var and idx declared and defined by this macro. idx will start from 0 and will go till bv->length - 1

Read More

BitVecForeachInRange

BitVecForeachInRange Description Iterate over bits in a specific range of the given bitvector bv. This is a convenience macro that iterates over a range using an internally managed index. The variable var is declared and defined by this macro.

Read More

BitVecForeachInRangeIdx

BitVecForeachInRangeIdx Description Iterate over bits in a specific range of the given bitvector bv at each index idx. The variables var and idx are declared and defined by this macro. idx will start from start and will go till end - 1

Read More

BitVecForeachReverse

BitVecForeachReverse Description Iterate over each bit var of the given bitvector bv in reverse order. This is a convenience macro that iterates backward using an internally managed index. The variable var is declared and defined by this macro.

Read More

BitVecForeachReverseIdx

BitVecForeachReverseIdx Description Iterate over each bit var of given bitvector bv at each index idx into the bitvector. The variables var and idx declared and defined by this macro. idx will start from bv->length - 1 and will go till 0

Read More

BitVecLen

BitVecLen Description Get number of bits currently in bitvector.

Read More

CLAMP

CLAMP Description Clamps the value of x to be within the inclusive range [lo, hi].

Read More

FReadFmt

FReadFmt Description Read formatted data from a file stream. This is a macro wrapper around FReadFmtInternal.

Read More

FREE

FREE Description Safely deallocates memory and nullifies pointer.

Read More

FROM_BIG_ENDIAN2

FROM_BIG_ENDIAN2 Description Conditionally converts value from big-endian to native byte order. On little-endian systems, this inverts the byte order. On big-endian systems, this is a no-op.

Read More

FROM_BIG_ENDIAN4

FROM_BIG_ENDIAN4 Description Conditionally converts value from big-endian to native byte order. On little-endian systems, this inverts the byte order. On big-endian systems, this is a no-op.

Read More

FROM_BIG_ENDIAN8

FROM_BIG_ENDIAN8 Description Conditionally converts value from big-endian to native byte order. On little-endian systems, this inverts the byte order. On big-endian systems, this is a no-op.

Read More

FROM_LITTLE_ENDIAN2

FROM_LITTLE_ENDIAN2 Description Conditionally converts value from little-endian to native byte order. On big-endian systems, this inverts the byte order. On little-endian systems, this is a no-op.

Read More

FROM_LITTLE_ENDIAN4

FROM_LITTLE_ENDIAN4 Description Conditionally converts value from little-endian to native byte order. On big-endian systems, this inverts the byte order. On little-endian systems, this is a no-op.

Read More

FROM_LITTLE_ENDIAN8

FROM_LITTLE_ENDIAN8 Description Conditionally converts value from little-endian to native byte order. On big-endian systems, this inverts the byte order. On little-endian systems, this is a no-op.

Read More

FWriteFmt

FWriteFmt Description Write formatted output to a file stream. This macro internally uses StrWriteFmtInternal to format the string and then writes it to the stream.

Read More

FWriteFmtLn

FWriteFmtLn Description Write formatted output to a file stream followed by a newline character. This macro internally uses StrWriteFmtInternal to format the string and then writes it to the stream followed by a newline.

Read More

IN_RANGE

IN_RANGE Description Checks if the value x is within the inclusive range [lo, hi].

Read More

INVERT_ENDIANNESS2

INVERT_ENDIANNESS2 Description Inverts endianness of 16-bit (2-byte) value.

Read More

INVERT_ENDIANNESS4

INVERT_ENDIANNESS4 Description Inverts endianness of 32-bit (4-byte) value.

Read More

INVERT_ENDIANNESS8

INVERT_ENDIANNESS8 Description Inverts endianness of 64-bit (8-byte) value.

Read More

IOFMT_LVAL_APPEND_COMMA

IOFMT_LVAL_APPEND_COMMA Description Helper macro to append a comma after wrapping given argument in IOFMT Used in following macros

Read More

IS_ALPHA

IS_ALPHA Description Checks if the given character c is an ASCII alphabet.

Read More

IS_CAPS_ALPHA

IS_CAPS_ALPHA Description Checks if the given character c is an uppercase ASCII alphabet.

Read More

IS_DIGIT

IS_DIGIT Description Checks if the given character c is an ASCII digit.

Read More

IS_LITTLE_ENDIAN

IS_LITTLE_ENDIAN Description Compile-time endianness detection.

Read More

IS_PRINTABLE

IS_PRINTABLE Description Checks whether a given character ‘c’ is printable ascii or not.

Read More

IS_SPACE

IS_SPACE Description Checks if the given character c is a whitespace character.

Read More

IS_XDIGIT

IS_XDIGIT Description Checks if the given character c is a hexadecimal digit.

Read More

Iter

Iter Description Memory iterators are there to allow reading regions of memory by remembering current read position and the size limit. With proper checking we can guarantee that we can never overflow or underflow when reading a memory region This also means that Iter objects are created for use with only one reading operation, and one object in their lifetime. The designed API does not allow modifications to the data Iter is iterating over FIELDS: - data : Pointer to memory we’re iterating over - length : Number of objects in memory. - pos : Current iterating position. - size : Alignment requirements (if-any), must be at-least 1 - dir : Iteration direction, -1 or 1

Read More

ITER_DATA_TYPE

ITER_DATA_TYPE Description Get data type of Iter elements

Read More

IterInit

IterInit Description Initialize default Iter object to iterate in forward direction.

Read More

IterInitAligned

IterInitAligned Description Initialize Iter with custom alignment to iterate in forward direction.

Read More

IterInitAlignedT

IterInitAlignedT Description Initialize Iter with custom alignment to iterate in forward direction.

Read More

IterInitFromVec

IterInitFromVec Description Initialize Iter from vector data to iterate in forward direction.

Read More

IterInitFromVecT

IterInitFromVecT Description Initialize Iter from vector data to iterate in forward direction.

Read More

IterInitRev

IterInitRev Description Initialize default Iter object to iterate in backward direction.

Read More

IterInitRevAligned

IterInitRevAligned Description Initialize Iter with custom alignment to iterate in backward direction.

Read More

IterInitRevAlignedT

IterInitRevAlignedT Description Initialize Iter with custom alignment to iterate in backward direction.

Read More

IterInitRevFromVec

IterInitRevFromVec Description Initialize Iter from vector data to iterate in reverse direction.

Read More

IterInitRevFromVecT

IterInitRevFromVecT Description Initialize Iter from vector data starting at back

Read More

IterInitRevT

IterInitRevT Description Initialize default Iter object to iterate in backward direction.

Read More

IterInitT

IterInitT Description Initialize default Iter object to iterate in forward direction.

Read More

IterLength

IterLength Description Get total length of this Iter object

Read More

IterMove

IterMove Description Move current reading position of Iterator.

Read More

IterNext

IterNext Description Move to next element (wrapper for IterMove)

Read More

IterPeekAt

IterPeekAt Description Peek (not read) object from memory iter, given that - Provided Iter object is not NULL_ITER(mi). - There’s space left to read. - Length of object data is being read into is an integral multiple of size of data type this memory iter is iterating over. This is different from reading because it does not change current read position. This is good for making some decisions over data without changing the read position.

Read More

IterPos

IterPos Description If there’s space left to read in memory region we’re iterating over, then return a pointer to current read position.

Read More

IterPrev

IterPrev Description Move to previous element (wrapper for IterMove)

Read More

IterRead

IterRead Description Read object from memory iter, given that - Provided Iter object is not NULL_ITER(mi). - There’s space left to read. - Length of object data is being read into is an integral multiple of size of data type this memory iter is iterating over.

Read More

IterRemainingLength

IterRemainingLength Description Get remaining length left to read this memory iterator.

Read More

IterRemainingSize

IterRemainingSize Description Get remaining size left to read this memory iterator.

Read More

IterSize

IterSize Description Get total size of this Iter object

Read More

JR_ARR

JR_ARR Description Read a JSON array using a custom value reader expression. The macro parses a JSON array and calls the user-provided code block for each element. If the value can’t be parsed or reader fails to advance the iterator, the value is skipped.

Read More

JR_ARR_KV

JR_ARR_KV Description Conditionally parse a JSON array if key matches expected name.

Read More

JR_BOOL

JR_BOOL Description Read a JSON boolean value from stream and assign to target.

Read More

JR_BOOL_KV

JR_BOOL_KV Description Read a boolean key-value pair if key matches.

Read More

JR_FLT

JR_FLT Description Read a JSON float value from stream and assign to target.

Read More

JR_FLT_KV

JR_FLT_KV Description Read a float key-value pair if key matches.

Read More

JR_INT

JR_INT Description Read a JSON integer value from stream and assign to target.

Read More

JR_INT_KV

JR_INT_KV Description Read an integer key-value pair if key matches.

Read More

JR_OBJ

JR_OBJ Description Read a JSON object using a custom field reader expression. The macro parses the object and invokes the provided code block for each key-value pair. If the key is not recognized or parsing fails, the value is skipped.

Read More

JR_OBJ_KV

JR_OBJ_KV Description Conditionally parse a JSON object if key matches expected name.

Read More

JR_STR

JR_STR Description Read a JSON string value from stream and assign to target. The resulting string is dynamically allocated in Str format.

Read More

JR_STR_KV

JR_STR_KV Description Read a string key-value pair if key matches.

Read More

JW_ARR

JW_ARR Description Write a JSON array from a vector. Each item is rendered using the provided writer. Handles inserting commas between elements.

Read More

JW_ARR_KV

JW_ARR_KV Description Write a key and an array value into a JSON object. Intended for use within a JW_OBJ. Adds commas automatically.

Read More

JW_BOOL

JW_BOOL Description Append a boolean value to the JSON as unquoted true/false.

Read More

JW_BOOL_KV

JW_BOOL_KV Description Write a key and boolean value into a JSON object.

Read More

JW_FLT

JW_FLT Description Append a floating-point value to a JSON string.

Read More

JW_FLT_KV

JW_FLT_KV Description Write a key and float value to a JSON object.

Read More

JW_INT

JW_INT Description Append an integer value to a JSON string.

Read More

JW_INT_KV

JW_INT_KV Description Write a key and integer value to a JSON object.

Read More

JW_OBJ

JW_OBJ Description Begin a JSON object and write key-value entries using JW_*_KV macros. This macro must be used as a wrapper for other JW_*_KV macros to generate a JSON object. Tracks whether commas are needed between entries using an internal flag.

Read More

JW_OBJ_KV

JW_OBJ_KV Description Write a key and nested object inside an existing JSON object. Should be called inside JW_OBJ. Adds commas appropriately based on insertion order.

Read More

JW_STR

JW_STR Description Append a string value (quoted) to the JSON.

Read More

JW_STR_KV

JW_STR_KV Description Write a key and string value into a JSON object.

Read More

LOG_ERROR

LOG_ERROR Description Writes an error-level log message. …[in] : Format string and arguments following printf-style syntax.

Read More

LOG_FATAL

LOG_FATAL Description Writes a fatal log message and aborts the program. …[in] : Format string and arguments following printf-style syntax.

Read More

LOG_INFO

LOG_INFO Description Writes an informational log message. …[in] : Format string and arguments following printf-style syntax.

Read More

LVAL

LVAL Description Creates a temporary, addressable l-value from a given expression x.

Read More

MAX2

MAX2 Description Returns the larger of two values x and y.

Read More

MIN2

MIN2 Description Returns the smaller of two values x and y.

Read More

NEW

NEW Description Allocates zero-initialized memory for a type.

Read More

NULL_ITER

NULL_ITER Description Type specific NULL for given Iter object. Use this instead of NULL when comparing for nullity of Iter objects of same type. Null value for Iter objects

Read More

NULL_ITER_DATA

NULL_ITER_DATA Description Type specific NULL for data type Iter object is iterating over. Use this instead of NULL when comparing for nullity of Iter objects of same type. Null value for Iter element pointers

Read More

ReadFmt

ReadFmt Description Read formatted input from the standard input stream (stdin). This is a convenience macro calling FReadFmt with stdin.

Read More

StrBegin

StrBegin Description Get pointer to first character in string

Read More

StrCharAt

StrCharAt Description Access character at given index

Read More

StrCharPtrAt

StrCharPtrAt Description Get pointer to character at given index

Read More

StrClear

StrClear Description Set string length to 0.

Read More

StrCmp

StrCmp Description Compare two Str objects

Read More

StrCmpCstr

StrCmpCstr Description Compare string with another const char* of specified length

Read More

StrCmpZstr

StrCmpZstr Description Compare string with a null-terminated const char* string

Read More

StrDelete

StrDelete Description Delete char at given index

Read More

StrDeleteLastChar

StrDeleteLastChar Description Delete last char from vec

Read More

StrDeleteRange

StrDeleteRange Description Delete chars in given range [start, start + count)

Read More

StrEnd

StrEnd Description Get pointer to one past the last character in string

Read More

StrFindCstr

StrFindCstr Description Find a fixed-length substring in a Str object.

Read More

StrFindStr

StrFindStr Description Find a key in a Str object.

Read More

StrFindZstr

StrFindZstr Description Find a key in a Str object.

Read More

StrFirst

StrFirst Description Access first character in string

Read More

StrForeach

StrForeach Description Iterate over each character chr of the given Str str. This is a convenience macro that iterates forward using an internally managed index. The variable chr is declared and defined by the underlying VecForeach macro.

Read More

StrForeachIdx

StrForeachIdx Description Iterate over each character chr of the given Str str at each index idx. This macro is a direct alias for VecForeachIdx specialized for Str. The variables chr and idx are declared and defined by the underlying macro.

Read More

StrForeachInRange

StrForeachInRange Description Iterate over characters in a specific range of the given Str str. This is a convenience macro that iterates over a range using an internally managed index. The variable chr is declared and defined by the underlying VecForeachInRange macro.

Read More

StrForeachInRangeIdx

StrForeachInRangeIdx Description Iterate over characters in a specific range of the given Str str at each index idx. This macro is a direct alias for VecForeachInRangeIdx specialized for Str. The variables chr and idx are declared and defined by the underlying macro.

Read More

StrForeachPtr

StrForeachPtr Description Iterate over each character pointer chrptr of the given Str str. This is a convenience macro that iterates forward using an internally managed index and provides a pointer to each character. The variable chrptr is declared and defined by the underlying VecForeachPtr macro as a pointer to the character type.

Read More

StrForeachPtrIdx

StrForeachPtrIdx Description Iterate over each character pointer chrptr of the given Str str at each index idx. This macro is a direct alias for VecForeachPtrIdx specialized for Str. The variables chrptr and idx are declared and defined by the underlying macro.

Read More

StrForeachPtrInRange

StrForeachPtrInRange Description Iterate over characters in a specific range of the given Str str (as pointers). This is a convenience macro that iterates over a range using an internally managed index and provides a pointer to each character. The variable chrptr is declared and defined by the underlying VecForeachPtrInRange macro as a pointer to the character type.

Read More

StrForeachPtrInRangeIdx

StrForeachPtrInRangeIdx Description Iterate over characters in a specific range of the given Str str at each index idx (as pointers). This macro is a direct alias for VecForeachPtrInRangeIdx specialized for Str. The variables chrptr and idx are declared and defined by the underlying macro.

Read More

StrForeachPtrReverse

StrForeachPtrReverse Description Iterate over each character pointer chrptr of the given Str str in reverse order. This is a convenience macro that iterates backward using an internally managed index and provides a pointer to each character. The variable chrptr is declared and defined by the underlying VecForeachPtrReverse macro as a pointer to the character type.

Read More

StrForeachReverse

StrForeachReverse Description Iterate over each character chr of the given Str str in reverse order. This is a convenience macro that iterates backward using an internally managed index. The variable chr is declared and defined by the underlying VecForeachReverse macro.

Read More

StrForeachReverseIdx

StrForeachReverseIdx Description Iterate over each character chr of the given Str str in reverse order at each index idx. This macro is a direct alias for VecForeachReverseIdx specialized for Str. The variables chr and idx are declared and defined by the underlying macro.

Read More

StrForeachReversePtrIdx

StrForeachReversePtrIdx Description Iterate over each character pointer chrptr of the given Str str in reverse order at each index idx. This macro is a direct alias for VecForeachPtrReverseIdx specialized for Str. The variables chrptr and idx are declared and defined by the underlying macro.

Read More

StrInitFromStr

StrInitFromStr Description Initialize a Str object using another one

Read More

StrInitFromZstr

StrInitFromZstr Description Initializes a Str object from a null-terminated C-style string (zstr). This macro calculates the length of zstr using strlen and then calls StrInitFromCstr to create the Str object.

Read More

StrInitStack

StrInitStack Description Initialize given string but use memory from stack. Such strings cannot be dynamically resized!!

Read More

StrInsert

StrInsert Description Insert contents of str2 into str at given index.

Read More

StrInsertCharAt

StrInsertCharAt Description Insert char into string of it’s type. Insertion index must not exceed string length.

Read More

StrInsertCstr

StrInsertCstr Description Insert a string of given length into given Str at given index.

Read More

StrInsertZstr

StrInsertZstr Description Insert a zero-terminated string into given Str at given index.

Read More

StrIterFromCstr

StrIterFromCstr Description Create string iterator from C string with explicit length

Read More

StrIterFromStr

StrIterFromStr Description Create string iterator from Str object

Read More

StrIterFromZstr

StrIterFromZstr Description Create string iterator from null-terminated C string

Read More

StrIterLength

StrIterLength Description Get total length in elements

Read More

StrIterMove

StrIterMove Description Move string iterator position by n elements

Read More

StrIterNext

StrIterNext Description Advance to next character in string iterator

Read More

StrIterPeek

StrIterPeek Description Peek current character without advancing

Read More

StrIterPeekAt

StrIterPeekAt Description Peek character at offset without advancing

Read More

StrIterPos

StrIterPos Description Get current read position pointer

Read More

StrIterPrev

StrIterPrev Description Move to previous character in string iterator

Read More

StrIterRead

StrIterRead Description Read character from iterator

Read More

StrIterRemainingLength

StrIterRemainingLength Description Get remaining elements left to read

Read More

StrIterRemainingSize

StrIterRemainingSize Description Get remaining bytes left to read

Read More

StrIterSize

StrIterSize Description Get total size of string data in bytes

Read More

StrLast

StrLast Description Access last character in string

Read More

StrLStrip

StrLStrip Description Strip only leading whitespace (or optional custom characters) from the given Str object. Returns a new Str object. Original is unmodified.

Read More

StrMerge

StrMerge Description Merge two strings and store the result in first string. By default, this uses R-value semantics (preserves source string). Data is copied from str2 into str. If a copy_init method is provided in str, each element from str2 will be copied using that method. Otherwise, a raw memory copy is performed.

Read More

StrMergeL

StrMergeL Description Merge two strings and store the result in first string, with L-value semantics. Data is copied from str2 into str. If a copy_init method is provided in str, each element from str2 will be copied using that method. Otherwise, a raw memory copy is performed.

Read More

StrMergeR

StrMergeR Description Merge two strings and store the result in first string, with R-value semantics. Data is copied from str2 into str. If a copy_init method is provided in str, each element from str2 will be copied using that method. Otherwise, a raw memory copy is performed.

Read More

StrPopBack

StrPopBack Description Pop char from string back.

Read More

StrPopFront

StrPopFront Description Pop char from string front.

Read More

StrPushBack

StrPushBack Description Push char into string.

Read More

StrPushBackCstr

StrPushBackCstr Description Push an array of chars with given length to the back of this string.

Read More

StrPushBackZstr

StrPushBackZstr Description Push a null-terminated string to the back of string.

Read More

StrPushCstr

StrPushCstr Description Push a array of characters with given length into this string at the given position.

Read More

StrPushFront

StrPushFront Description Push char into string front.

Read More

StrPushFrontCstr

StrPushFrontCstr Description Push a array of characters with given length to the front of this string

Read More

StrPushFrontZstr

StrPushFrontZstr Description Push a null-terminated string to the front of this string.

Read More

StrPushZstr

StrPushZstr Description Push a null-terminated string to this string at given position.

Read More

StrReadFmt

StrReadFmt Description Parse input string according to format string with rust-style placeholders, extracting values into provided arguments. This is a macro wrapper around StrReadFmtInternal.

Read More

StrRemove

StrRemove Description Remove char from string at given index and store in given pointer.

Read More

StrRemoveRange

StrRemoveRange Description Remove data from string in given range [start, start + count)

Read More

StrReserve

StrReserve Description Reserve space for string.

Read More

StrResize

StrResize Description Resize string. If length is smaller than current capacity, string length is shrinked. If length is greater than current capacity, space is reserved and string is expanded.

Read More

StrReverse

StrReverse Description Reverse contents of this string.

Read More

StrRStrip

StrRStrip Description Strip only trailing whitespace (or optional custom characters) from the given Str object. Returns a new Str object. Original is unmodified.

Read More

StrStrip

StrStrip Description Strip leading and trailing whitespace (or optional custom characters) from the given Str object. Returns a new Str object. Original is unmodified. The returned Str must be deinited after use.

Read More

StrSwapCharAt

StrSwapCharAt Description Swap chars at given indices.

Read More

StrTryReduceSpace

StrTryReduceSpace Description Try reducing memory footprint of string. This is to be used when we know actual allocated memory for vec is large, and we won’t need it in future, so we can reduce it to whatever’s required at the moment.

Read More

TO_BIG_ENDIAN2

TO_BIG_ENDIAN2 Description Conditionally converts value from native byte order to big-endian. On little-endian systems, this inverts the byte order. On big-endian systems, this is a no-op.

Read More

TO_BIG_ENDIAN4

TO_BIG_ENDIAN4 Description Conditionally converts value from native byte order to big-endian. On little-endian systems, this inverts the byte order. On big-endian systems, this is a no-op.

Read More

TO_BIG_ENDIAN8

TO_BIG_ENDIAN8 Description Conditionally converts value from native byte order to big-endian. On little-endian systems, this inverts the byte order. On big-endian systems, this is a no-op.

Read More

TO_LITTLE_ENDIAN2

TO_LITTLE_ENDIAN2 Description Conditionally converts value from native byte order to little-endian. On big-endian systems, this inverts the byte order. On little-endian systems, this is a no-op.

Read More

TO_LITTLE_ENDIAN4

TO_LITTLE_ENDIAN4 Description Conditionally converts value from native byte order to little-endian. On big-endian systems, this inverts the byte order. On little-endian systems, this is a no-op.

Read More

TO_LITTLE_ENDIAN8

TO_LITTLE_ENDIAN8 Description Conditionally converts value from native byte order to little-endian. On big-endian systems, this inverts the byte order. On little-endian systems, this is a no-op.

Read More

TO_LOWER

TO_LOWER Description Converts a character to lowercase.

Read More

TO_NATIVE_ENDIAN2

TO_NATIVE_ENDIAN2 Description Maintains native endianness for 16-bit values. This is a no-op that returns the value unchanged.

Read More

TO_NATIVE_ENDIAN4

TO_NATIVE_ENDIAN4 Description Maintains native endianness for 32-bit values. This is a no-op that returns the value unchanged.

Read More

TO_NATIVE_ENDIAN8

TO_NATIVE_ENDIAN8 Description Maintains native endianness for 64-bit values. This is a no-op that returns the value unchanged.

Read More

TO_UPPER

TO_UPPER Description Converts a character to uppercase.

Read More

TRICK_PARENS

TRICK_PARENS Description Part of the parenthesis trick to delay text generation

Read More

ValidateIter

ValidateIter Description Validate whether a given Iter object is valid. Not foolproof but will work most of the time. Aborts if provided Iter is not valid.

Read More

ValidateStrIter

ValidateStrIter Description Validate whether a given StrIter object is valid. Not foolproof but will work most of the time. Aborts if provided StrIter is not valid.

Read More

ValidateStrIters

ValidateStrIters Description Validate whether a given StrIters object is valid. Not foolproof but will work most of the time. Aborts if provided StrIters is not valid.

Read More

Vec

Vec Description Typesafe vector definition. This is much like C++ template std::vector

Read More

WriteFmt

WriteFmt Description Write formatted output to the standard output stream (stdout). This is a convenience macro calling FWriteFmt with stdout.

Read More

WriteFmtLn

WriteFmtLn Description Write formatted output to the standard output stream (stdout) followed by a newline. This is a convenience macro calling FWriteFmtLn with stdout.

Read More