ZYCORE_EXPORTZyanStatusZyanArgParse(constZyanArgParseConfig*cfg,ZyanVector*parsed,constchar**error_token)
Parse arguments according to a ZyanArgParseConfig definition.
Parameterscfg Argument parser config to use.
parsed Receives the parsed output. Vector of ZyanArgParseArg. Ownership is transferred to the user.
Input is expected to be uninitialized. On error, the vector remains uninitialized.
error_token On error, if it makes sense, receives the argument fragment causing the error. Optional,
may be ZYAN_NULL. The pointer borrows into the cfg struct and doesn't have to be freed by the user.
Returns
A ZyanStatus status determining whether the parsing succeeded.
ZYCORE_EXPORTZyanStatusZyanArgParseEx(constZyanArgParseConfig*cfg,ZyanVector*parsed,constchar**error_token,ZyanAllocator*allocator)
Parse arguments according to a ZyanArgParseConfig definition.
This version allows specification of a custom memory allocator and thus supports no-libc.
Parameterscfg Argument parser config to use.
parsed Receives the parsed output. Vector of ZyanArgParseArg. Ownership is transferred to the user.
Input is expected to be uninitialized. On error, the vector remains uninitialized.
error_token On error, if it makes sense, receives the argument fragment causing the error. Optional,
may be ZYAN_NULL. The pointer borrows into the cfg struct and doesn't have to be freed by the user.
allocator The ZyanAllocator to be used for allocating the output vector's data.
Returns
A ZyanStatus status determining whether the parsing succeeded.