-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStringParser.hpp
More file actions
38 lines (35 loc) · 825 Bytes
/
StringParser.hpp
File metadata and controls
38 lines (35 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef STRINGPARSER_HPP
#define STRINGPARSER_HPP
/**
* @name StringParser
* @author Ciyang
* @date 2019-11-06
* @version 1.0.0
* @copyright Copyright © 2019 Ciyang. All rights reserved.
*/
class StringParser
{
public:
StringParser();
StringParser(const char *);
StringParser(const StringParser &);
~StringParser();
int setString(const char *);
char readChar();
long long readLL();
unsigned long long readULL();
double readDouble();
char *readStringUntilLineBreak();
char *readStringUntil(const char *);
char *readStringOnly(const char *);
const char *getConstString() const;
const char *getConstPendingString() const;
StringParser getString() const;
StringParser getPendingString() const;
bool isEnd() const;
private:
char *asciiStr;
unsigned int parsePtr;
unsigned int stringSize;
};
#endif