ZyanArgParseConfig_(3)

πŸ“¦
version 1.5.2 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

ZyanArgParseConfig_ β€” the config struct that tells the argument parser what to expect, bestie. It's giving "settings page for your argv". ✨


🌸 SYNOPSIS 🌸

#include <ArgParse.h>

πŸŽ€ Public Attributes

  • const char ** argc… no wait, let me not mess this up. The actual lineup, exactly as declared:
const char ** argv
ZyanUSize argc
ZyanUSize min_unnamed_args
ZyanUSize max_unnamed_args
ZyanArgParseDefinition * args

Periodt. Five members, no more, no less. πŸ’…


πŸ¦‹ Detailed Description

Configuration for argument parsing. That's it, that's the whole glow-up β€” it's the lil bundle of facts you hand over so the parser knows what you want from the command line. 🫢


πŸ‘‘ Member Data Documentation πŸ‘‘

πŸ’œ ZyanUSize ZyanArgParseConfig_::argc

The argc argument passed to main by LibC. Yes, that argc. The one you've been ignoring your whole life. It's lowkey the count of how many things are in argv.

🌈 ZyanArgParseDefinition* ZyanArgParseConfig_::args

Argument definition array, or ZYAN_NULL.

Okay so here's the tea β˜•: it expects a pointer to an array of ZyanArgParseDefinition instances, and the array is terminated by setting the .name field of the last element to ZYAN_NULL. That's your sentinel, don't forget it or it will just keep reading vibes until it crashes. And if no named arguments should be parsed, you can also set this to ZYAN_NULL β€” totally valid, no shame. πŸ™ˆ

πŸ“ const char** ZyanArgParseConfig_::argv

The argv argument passed to main by LibC. The icon itself. The array of strings. Main character energy. πŸ‘‘

⭐ ZyanUSize ZyanArgParseConfig_::max_unnamed_args

Maximum # of accepted unnamed / anonymous arguments. So like, how many mystery strings are you willing to tolerate before you start yelling.

🧚 ZyanUSize ZyanArgParseConfig_::min_unnamed_args

Minimum # of accepted unnamed / anonymous arguments. And this is the floor β€” how many anonymous args you require before the parse even counts as valid. Fr fr.

πŸ’€ Pro tip from your girl: min_unnamed_args and max_unnamed_args are doing a lil vibe check on the same thing from opposite ends. Keep them sensible or you'll confuse yourself, not the parser.

✨ Author ✨

Generated automatically by Doxygen for Zycore from the source code. So no, a human did not hand-craft these words β€” the machine did, and honestly? She ate. πŸ”₯


That's the whole page bestie, no cap. This beauty ships with Zycore, Version 1.5.2.0, and yeah the docs are auto-generated so be nice to them πŸŽ€ slay, go parse some arguments, iykyk πŸ’œ

πŸ“¦ where this page comes from