libnative-utilities/include/utils/LineReader.hpp

29 lines
654 B
C++
Raw Normal View History

2024-08-15 18:40:30 +08:00
#ifndef LINEREADER_HPP
#define LINEREADER_HPP
#include <stdio.h>
class LineReader{
private:
FILE* fileHandle;
public:
LineReader(const char* filePath);
static char* getLine(const char* data, const unsigned int data_length, const unsigned int lineNum, unsigned int withLineBreak);
static char* getLine(const char* data, const unsigned int data_length, const unsigned int lineNum);
unsigned char* getLine(unsigned int lineNum, unsigned int withLineBreak);
unsigned char* getLine(unsigned int lineNum);
~LineReader();
};
#endif