SDL Visual Test

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
parsehelper.c File Reference
`#include <SDL_test.h>`
`#include "SDL_visualtest_harness_argparser.h"`

## Functions
char ** | SDLVisualTest_Tokenize (char *str, int max_token_len)
char ** | SDLVisualTest_ParseArgsToArgv (char *args)

## Detailed Description

Source file with some helper functions for parsing strings.

## Function Documentation

char** SDLVisualTest_ParseArgsToArgv | ( | char * | args) |  |

Takes an string of command line arguments and breaks them up into an array based on whitespace.

Parameters

  args | The string of arguments.

Returns
  NULL on failure, an array of strings on success. The last element of the array is NULL. The first element of the array is NULL and should be set to the path of the executable by the caller.

char** SDLVisualTest_Tokenize | ( | char * | str,
|  | int | max_token_len
| ) |  |

Takes a string and breaks it into tokens by splitting on whitespace.

Parameters

  str | The string to be split.
  max_token_len | Length of each element in the array to be returned.

Returns
  NULL on failure; an array of strings with the tokens on success. The last element of the array is NULL.