From c4ad7317678b43ff56410f773414cb0692c3c462 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Fri, 21 Jun 2024 16:41:55 -0400 Subject: [PATCH] src: use `starts_with` in node_dotenv.cc --- src/node_dotenv.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node_dotenv.cc b/src/node_dotenv.cc index af7433d2a08369..cd761aab70cd52 100644 --- a/src/node_dotenv.cc +++ b/src/node_dotenv.cc @@ -135,8 +135,7 @@ void Dotenv::ParseContent(const std::string_view input) { } // Remove export prefix from key - auto have_export = key.compare(0, 7, "export ") == 0; - if (have_export) { + if (key.starts_with("export ")) { key.remove_prefix(7); }