Conversation
Notices
-
doing regex magic that could be useful for handling command line arguments for my own app :jahy_smug4:
good thing C++ STL has regex implementations :cirno_uwu2:
- :gura_sus: 1e+6 litres :flag_china: likes this.
-
@MoeBritannica wouldn't an arg vector be a better way for argument parsing?
-
@EdBoatConnoisseur yea but doing it alone kinda falls short when doing file IO stuff when folder names with whitespaces cause them to be identified as different arguments.
After arg vector, then I'll just basically combined them into a single string to perform regex, which would extract the given instructions in a clean, tidy format :vajra_comfy:
not to mention that you wouldnt need to worry about syntax depending on your regex :shiro_comfy:
-
@EdBoatConnoisseur here is basically a sample of parsing the command line arguments into something organized to use from it.
though sometimes what I really dislike is that the optional still takes into account even unused, hench inserting an empty submatch from -debug :senko_sigh:
-
@EdBoatConnoisseur >path can be inferred as normal
im dum :tamamo_bruh:
-
@MoeBritannica yeh... sepples got all the libraries for handling every path bullshit you can find, tho be sure to use the correct encoding.