Skip to content

Commit 25719b1

Browse files
authored
src: use starts_with in node_dotenv.cc
PR-URL: #53539 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent a0cb507 commit 25719b1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/node_dotenv.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ void Dotenv::ParseContent(const std::string_view input) {
135135
}
136136

137137
// Remove export prefix from key
138-
auto have_export = key.compare(0, 7, "export ") == 0;
139-
if (have_export) {
138+
if (key.starts_with("export ")) {
140139
key.remove_prefix(7);
141140
}
142141

0 commit comments

Comments
 (0)