We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
endsWith
string_views
1 parent d5bf7b4 commit 6179a4dCopy full SHA for 6179a4d
packages/host/cpp/AddonRegistry.cpp
@@ -30,7 +30,7 @@ napi_status napi_emplace_named_property_object(napi_env env,
30
return status;
31
}
32
33
-bool endsWith(const std::string &str, const std::string &suffix) {
+bool endsWith(const std::string_view &str, const std::string_view &suffix) {
34
#if __cplusplus >= 202002L // __cpp_lib_starts_ends_with
35
return str.ends_with(suffix);
36
#else
0 commit comments