Mercurial > hg > forks > gldragon
comparison dmutil.h @ 19:a329f0216491
Implement PLY file format parsing and extremely simplistic scene setup file format.
Not finished yet.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 07 Nov 2019 20:15:33 +0200 |
parents | |
children | 1404dfcee7b8 |
comparison
equal
deleted
inserted
replaced
18:b1e75c65016d | 19:a329f0216491 |
---|---|
1 // | |
2 // | |
3 // | |
4 #ifndef DMUTIL_H | |
5 #define DMUTIL_H 1 | |
6 | |
7 #include <string> | |
8 #include <vector> | |
9 #include <cstdio> | |
10 #include <iostream> | |
11 | |
12 | |
13 #define SET_WHITESPACE "\t\n\v\f\r " | |
14 | |
15 | |
16 std::string dmStrLTrim(const std::string& str, const std::string& delim = SET_WHITESPACE); | |
17 std::string dmStrRTrim(const std::string& str, const std::string& delim = SET_WHITESPACE); | |
18 std::string dmStrTrim(const std::string& str, const std::string& delim = SET_WHITESPACE); | |
19 | |
20 std::vector<std::string> dmStrSplit(const std::string& str, const std::string& delim = SET_WHITESPACE); | |
21 std::string dmStrJoin(const std::vector<std::string> &list, const std::string &delim); | |
22 | |
23 bool dmReadText(const std::string &filename, std::string &buf, const int maxSize); | |
24 bool dmFileExists(const std::string &filename, std::ios_base::openmode mode = std::ios_base::in); | |
25 | |
26 | |
27 #endif |