SDL Visual Test
 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
argsThe 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
strThe string to be split.
max_token_lenLength 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.