add utf8 string size and remove string dep

This commit is contained in:
chatlanin
2023-04-04 10:53:36 +03:00
parent 092dcea16b
commit b501d98f8a
9 changed files with 65 additions and 35 deletions

View File

@@ -20,6 +20,7 @@
#include "security/uuid.hpp"
#include "security/is_string.hpp"
#include "security/is_link.hpp"
#include "string/utf8_len.hpp"
// for example
int f(int a)
@@ -318,4 +319,16 @@ int main(int argc, char *argv[])
if (!hack::security::is_link(link))
hack::error()("no link");
}
hack::log()("============================================================");
hack::log()("string::utf8_size");
{// ex: utf8_size
std::string str = "hi hi";
auto s = hack::string::utf8_len(str);
hack::log()(s);
s = hack::string::utf8_len("asdf");
hack::log()(s);
}
}