From f5bd0b7971b92e8d236133b1e788876a1a1f0797 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 25 Sep 2021 00:04:54 +0200 Subject: [PATCH] patterns: Moved std::str to std::string --- plugins/builtin/source/content/pl_builtin_functions.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/builtin/source/content/pl_builtin_functions.cpp b/plugins/builtin/source/content/pl_builtin_functions.cpp index 48e5ffb78..c5e0e062c 100644 --- a/plugins/builtin/source/content/pl_builtin_functions.cpp +++ b/plugins/builtin/source/content/pl_builtin_functions.cpp @@ -177,17 +177,17 @@ namespace hex::plugin::builtin { } - ContentRegistry::PatternLanguageFunctions::Namespace nsStdStr = { "std", "str" }; + ContentRegistry::PatternLanguageFunctions::Namespace nsStdString = { "std", "string" }; { /* length(string) */ - ContentRegistry::PatternLanguageFunctions::add(nsStdStr, "length", 1, [](Evaluator *ctx, auto params) -> std::optional { + ContentRegistry::PatternLanguageFunctions::add(nsStdString, "length", 1, [](Evaluator *ctx, auto params) -> std::optional { auto string = Token::literalToString(params[0], false); return u128(string.length()); }); /* at(string, index) */ - ContentRegistry::PatternLanguageFunctions::add(nsStdStr, "at", 2, [](Evaluator *ctx, auto params) -> std::optional { + ContentRegistry::PatternLanguageFunctions::add(nsStdString, "at", 2, [](Evaluator *ctx, auto params) -> std::optional { auto string = Token::literalToString(params[0], false); auto index = Token::literalToSigned(params[1]); @@ -201,7 +201,7 @@ namespace hex::plugin::builtin { }); /* substr(string, pos, count) */ - ContentRegistry::PatternLanguageFunctions::add(nsStdStr, "substr", 3, [](Evaluator *ctx, auto params) -> std::optional { + ContentRegistry::PatternLanguageFunctions::add(nsStdString, "substr", 3, [](Evaluator *ctx, auto params) -> std::optional { auto string = Token::literalToString(params[0], false); auto pos = Token::literalToUnsigned(params[1]); auto size = Token::literalToUnsigned(params[2]);