Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 673 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 673 Bytes

ArgParser

Weekly Source Code #201804

Home project for reusable argument parser class.

ArgParser methods:

  • (id) initWithArgs: (NSArray *) args; // sets member var w/ argsArray // not needed for C version

  • (bool) isInArgs: (NSString *) name withAValue: (bool) bWithValue; // returns true/false.

  • (NSString *) getArgValue: (NSString *) name; // returns val for arg specified or "NOT_SET"

  • (bool) doesArg: (NSString *) name haveValue: (NSString *) value; // returns true/false if argName has value specified.

Test cases: isInArgs, bWithValue, test with, without, and last param with value

Test Params
-ANoValue -BWithValue 24 -CNoValue -DLastWithValue 42