GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
tokenizer

String Tokenizer Functions. More...

+ Collaboration diagram for tokenizer:

Functions

s32 gf_token_get (const char *Buffer, s32 Start, const char *Separator, char *Container, s32 ContainerSize)
 get string component More...
 
s32 gf_token_get_strip (const char *Buffer, s32 Start, const char *Separator, const char *strip_set, char *Container, s32 ContainerSize)
 get string component without delimitting characters More...
 
s32 gf_token_get_line (const char *buffer, u32 start, u32 size, char *line_buffer, u32 line_buffer_size)
 line removal More...
 
s32 gf_token_find (const char *Buffer, u32 Start, u32 Size, const char *Pattern)
 pattern location More...
 

Detailed Description

This section documents the basic string tokenizer of the GPAC framework.

Function Documentation

s32 gf_token_get ( const char *  Buffer,
s32  Start,
const char *  Separator,
char *  Container,
s32  ContainerSize 
)

Gets the next string component comprised in a given set of characters

Parameters
Buffersource string to scan
Startchar offset from begining of buffer where tokenization shall start
Separatorseparator characters to use
Containeroutput buffer location
ContainerSizeoutput buffer allocated size
Returns
position of the first char in the buffer after the last terminating separator, or -1 if token could not be found

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

s32 gf_token_get_strip ( const char *  Buffer,
s32  Start,
const char *  Separator,
const char *  strip_set,
char *  Container,
s32  ContainerSize 
)

Gets the next string component comprised in a given set of characters, removing surrounding characters

Parameters
Buffersource string to scan
Startchar offset from begining of buffer where tokenization shall start
Separatorseparator characters to use
strip_setsurrounding characters to remove
Containeroutput buffer location
ContainerSizeoutput buffer allocated size
Returns
position of the first char in the buffer after the last terminating separator, or -1 if token could not be found

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

s32 gf_token_get_line ( const char *  buffer,
u32  start,
u32  size,
char *  line_buffer,
u32  line_buffer_size 
)

Gets one line from buffer and remove delimiters CR, LF and CRLF

Parameters
buffersource string to scan
startchar offset from begining of buffer where tokenization shall start
sizesize of the input buffer to analyze
line_bufferoutput buffer location
line_buffer_sizeoutput buffer allocated size
Returns
position of the first char in the buffer after the last line delimiter, or -1 if no line could be found

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

s32 gf_token_find ( const char *  Buffer,
u32  Start,
u32  Size,
const char *  Pattern 
)

Locates a pattern in the buffer

Parameters
Buffersource string to scan
Startchar offset from begining of buffer where tokenization shall start
Sizesize of the input buffer to analyze
Patternpattern to locate
Returns
position of the first char in the buffer after the pattern, or -1 if pattern could not be found

+ Here is the caller graph for this function: