20 #include <ripple/beast/core/LexicalCast.h>
21 #include <ripple/beast/core/SemanticVersion.h>
34 for (
auto const& x : list)
60 auto ret = input.
find(what);
77 input.
begin(), input.
end(), [](std::string::value_type c) {
78 return std::isdigit(c, std::locale::classic());
98 if (n < 0 || n > limit)
110 bool allowLeadingZeroes,
118 if (!allowLeadingZeroes && input[0] ==
'0')
122 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-");
128 value = input.
substr(0, last);
129 input.
erase(0, last);
136 bool allowLeadingZeroes,
149 }
while (
chop(
".", input));
157 : majorVersion(0), minorVersion(0), patchVersion(0)
172 input.
begin(), input.
end(), [](std::string::value_type c) {
173 return std::isspace(c, std::locale::classic());
179 [](std::string::value_type c) {
180 return std::isspace(c, std::locale::classic());
185 if (left_iter >= right_iter)
191 if (version != input)
197 if (!
chop(
".", version))
203 if (!
chop(
".", version))
211 if (
chop(
"-", version))
222 if (
chop(
"+", version))
232 return version.
empty();
309 int const iLeft(lexicalCastThrow<int>(left));
310 int const iRight(lexicalCastThrow<int>(right));
314 else if (iLeft < iRight)
321 int result = left.compare(right);