Skip to content

Commit

Permalink
Remove unused splitAlphaNumParts private function
Browse files Browse the repository at this point in the history
  • Loading branch information
Geod24 committed Jun 5, 2024
1 parent 70a8c47 commit 57fab79
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions source/dubregistry/dbcontroller.d
Original file line number Diff line number Diff line change
Expand Up @@ -610,29 +610,3 @@ bool vcmp(string va, string vb)
import dub.dependency;
return Version(va) < Version(vb);
}

private string[] splitAlphaNumParts(string str)
@safe {
string[] ret;
while (!str.empty) {
while (!str.empty && !str.front.isIdentChar()) str.popFront();
if (str.empty) break;
size_t i = str.length;
foreach (j, dchar ch; str)
if (!isIdentChar(ch)) {
i = j;
break;
}
if (i > 0) {
ret ~= str[0 .. i];
str = str[i .. $];
}
if (!str.empty) str.popFront(); // pop non-ident-char
}
return ret;
}

private bool isIdentChar(dchar ch)
@safe {
return std.uni.isAlpha(ch) || std.uni.isNumber(ch);
}

0 comments on commit 57fab79

Please sign in to comment.