-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmstring.hpp
More file actions
36 lines (29 loc) · 752 Bytes
/
mstring.hpp
File metadata and controls
36 lines (29 loc) · 752 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
#ifndef MSTRING_HPP
#define MSTRING_HPP
#include <vector>
#include <string>
#include <algorithm>
class MString
{
public:
MString();
MString(const char *s);
MString(std::string s);
MString(MString &source);
MString& operator=(const MString& source);
~MString();
std::string str(void);
std::vector<std::string> split(std::string on);
std::string tohex(void);
friend std::ostream& operator<<(std::ostream& os, const MString& me);
private:
std::string m_string;
};
bool is_shell_metachar(unsigned char c);
std::string
sane_elem(std::string& insane);
// Test
//std::string insane = "Shitty Windows File&Name ∞ (too long)";
//std::cout << sane_elem(insane) << std::endl;
//exit(0);
#endif