Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

haXe getopt

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 opt
Octocat-spinner-32 test
Octocat-spinner-32 Getopt.hx
Octocat-spinner-32 README
README
GETOPT
======
Utility to parse command line arguments using same/similar conventions as the Unix getopt() function.


USAGE
-----

# Create a instance of the parser
var go = new Getopt();

# Add command line options to parse
# For example, to store a string value into the field 'f'
go.addSwitch( ["f"], store( "filename", TString ) );

# Parse an array of arguments (like returned by neko.Sys.args())
go.parse( ["-f","myfile"] );
# Or
go.parseString( "-f myfile" );

# Your value is now available at
trace( go.opt.filename ); // myfile
Something went wrong with that request. Please try again.