Major string_view refactor. Added namespace sv

This commit is contained in:
2022-04-16 02:26:32 -04:00
parent b6d603034e
commit d2c81e640d
13 changed files with 381 additions and 309 deletions

View File

@@ -1,12 +1,12 @@
#include "wrap-string.hpp"
#include "wrap-vector.hpp"
#include "util.hpp"
#include "drivenengine.hpp"
#include <utility>
#include <iostream>
#include <cstring>
#include "drivenengine.hpp"
DrivenEngineReg *DrivenEngineReg::All;
DrivenEngineReg::DrivenEngineReg(const char *n, DrivenEngineMaker fn) {
@@ -66,7 +66,7 @@ void Channel::echo_command() {
}
// Find out how much of the command matches.
int match = util::common_prefix_length(current_command_, desired_command_);
int match = sv::common_prefix_length(current_command_, desired_command_);
// Echo backspaces to remove the non-matching part.
int remove = current_command_.size() - match;