File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 33#include < cstdint>
44#include < stdexcept>
55#include < string>
6+ #include < vector>
7+
68#ifdef _WIN32
79#include < stdio.h>
810#else
11+
912#include < sys/ioctl.h>
13+
1014#endif
1115
1216namespace Term ::Private {
@@ -93,6 +97,7 @@ inline std::string utf32_to_utf8(const std::u32string& s) {
9397 }
9498 return r;
9599}
100+
96101// coverts a string into an integer
97102inline int convert_string_to_int (const char * string,
98103 const char * format,
@@ -107,4 +112,13 @@ inline int convert_string_to_int(const char* string,
107112#endif
108113}
109114
115+ // converts a vector of char into a string
116+ inline std::string vector_to_string (const std::vector<char >& vector) {
117+ std::string string;
118+ for (char i : vector) {
119+ string.push_back (i);
120+ }
121+ return string;
122+ }
123+
110124} // namespace Term::Private
You can’t perform that action at this time.
0 commit comments