Got logging and errors basically all working the way I want
This commit is contained in:
@@ -1 +1,29 @@
|
||||
#include "StringUtils.hpp"
|
||||
|
||||
/* std::string nb::wstr_to_str(std::wstring in) {
|
||||
std::size_t wstrlen = in.length();
|
||||
char* c_str= new char[wstrlen];
|
||||
std::wcstombs(c_str, in.c_str(), wstrlen);
|
||||
std::string ret(c_str, wstrlen);
|
||||
delete[] c_str;
|
||||
return ret;
|
||||
} */
|
||||
|
||||
std::string nb::indent_strblock(
|
||||
std::string block,
|
||||
std::string prepend,
|
||||
std::string topIndent
|
||||
) {
|
||||
return topIndent + nb::find_and_replace(
|
||||
block,
|
||||
nb::NEWLINE,
|
||||
nb::NEWLINE + prepend
|
||||
);
|
||||
}
|
||||
|
||||
std::string nb::indent_strblock(
|
||||
std::string block,
|
||||
std::string prepend
|
||||
) {
|
||||
return nb::indent_strblock(block, prepend, prepend);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user