Step 167: split EditorState into sub-states
This commit is contained in:
@@ -3,14 +3,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <cctype>
|
||||
|
||||
inline std::string trimCopy(const std::string& s) {
|
||||
size_t start = 0;
|
||||
while (start < s.size() && std::isspace((unsigned char)s[start])) ++start;
|
||||
size_t end = s.size();
|
||||
while (end > start && std::isspace((unsigned char)s[end - 1])) --end;
|
||||
return s.substr(start, end - start);
|
||||
}
|
||||
#include "StringUtils.h"
|
||||
|
||||
inline bool parseLineColInput(const std::string& input, int& outLine, int& outCol) {
|
||||
std::string s = trimCopy(input);
|
||||
|
||||
Reference in New Issue
Block a user