All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Command Line Arguments API

Click here for the API reference documentation.


When a program starts, arguments may be passed from the command line. This sample uses the program foo is started with arguments bar and barz:

$ foo bar barz

The arguments can be accessed using le_arg_GetArg() using an index to specify which argument to access. The first argument has index 0, the second argument has index 1, etc. The code sample argument bar has index 0 and the argument barz has index 1. The number of available arguments is obtained using le_arg_NumArgs().

The name of the program is obtained using le_arg_GetProgramName().

The program name and all arguments are assumed to be Null-terminated UTF-8 strings. For more information about UTF-8 strings see UTF-8 String Handling API.


Copyright (C) Sierra Wireless, Inc. 2013. All rights reserved. Use of this work is subject to license.