ml_string

This commit is contained in:
2021-02-19 23:52:16 +01:00
parent a39e61a061
commit fa7cbad70b
5 changed files with 47 additions and 15 deletions

9
ml.cpp
View File

@@ -2,6 +2,7 @@
#include "ml.h"
#include "ml_io.h"
#include "ml_date.h"
#include "ml_string.h"
#include "csvparser.h"
#include "sslclient.h"
@@ -49,14 +50,6 @@
// Convert an object to a string using a string stream conveniently
#define to_string(x) static_cast<std::ostringstream>((std::ostringstream() << std::dec << x )).str()
// Replace a substring with a replacement string in a source string
void replace_substring(std::string &src, const std::string &substr, const std::string &replacement) {
size_t i = 0;
for (i = src.find(substr, i); i != std::string::npos; i = src.find(substr, i)) {
src.replace(i, substr.size(), replacement);
i += replacement.size();
}
}
// Is this character a valid lisp symbol character
bool is_symbol(char ch) {