51Degrees Device Detection C/C++  4.1

A device detection library that is used natively or by 51Degrees products

TextFile

Detailed Description

Contains helper methods for accessing and using text files.

This is of most use in unit tests and examples, where text files containing sample data are used.

Collaboration diagram for TextFile:

Functions

void  fiftyoneDegreesTextFileIterate (const char *fileName, const char *buffer, int length, void *state, void(*callback)(const char *, void *))
Iterates over all the lines in a text file calling the callback method with each line. More...

Function Documentation

◆ fiftyoneDegreesTextFileIterate()

void fiftyoneDegreesTextFileIterate ( const char *   fileName,
const char *   buffer,
int   length,
void *   state,
void(*)(const char *, void *)   callback  
)

Iterates over all the lines in a text file calling the callback method with each line.

Parameters
fileName - name of the file to iterate over
buffer - to use for reading lines into
length - of the buffer
state - pointer to pass to the callback method
callback - method to call with each line
Examples
Hash/OfflineProcessing.c.
On This Page