We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82aa1ce commit 57196d6Copy full SHA for 57196d6
src/Expand.cxx
@@ -4,14 +4,16 @@
4
5
#include "Expand.hxx"
6
7
+using std::string_view_literals::operator""sv;
8
+
9
void
10
Expand(std::string &p, const StringMap &vars) noexcept
11
{
12
const std::string src = std::move(p);
13
p.clear();
14
15
std::string::size_type start = 0, pos;
- while ((pos = src.find("${", start)) != src.npos) {
16
+ while ((pos = src.find("${"sv, start)) != src.npos) {
17
std::string::size_type end = src.find('}', start + 2);
18
if (end == src.npos)
19
break;
0 commit comments