Implement more sophisticated readline-mode

This commit is contained in:
2021-11-04 13:40:42 -04:00
parent cf5a2d7462
commit deaf4e4873
7 changed files with 150 additions and 64 deletions

View File

@@ -56,6 +56,12 @@ std::string hash_to_hex(const HashValue &hash);
// Split a string into multiple strings
StringVec split(const std::string &s, char sep);
// Return N repetitions of string A
std::string repeat_string(const std::string &a, int n);
// Return the length of the common prefix of A and B.
int common_prefix_length(const std::string &a, const std::string &b);
// String to lowercase/uppercase. Ascii only, no unicode.
std::string tolower(std::string input);
std::string toupper(std::string input);