Skip to content

std.ascii: remove LUT and deprecations #13370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/std/SemanticVersion.zig
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub fn parse(text: []const u8) !Version {
if (id.len == 0) return error.InvalidVersion;

// Identifiers MUST comprise only ASCII alphanumerics and hyphens [0-9A-Za-z-].
for (id) |c| if (!std.ascii.isAlNum(c) and c != '-') return error.InvalidVersion;
for (id) |c| if (!std.ascii.isAlphanumeric(c) and c != '-') return error.InvalidVersion;

// Numeric identifiers MUST NOT include leading zeroes.
const is_num = for (id) |c| {
Expand All @@ -133,7 +133,7 @@ pub fn parse(text: []const u8) !Version {
if (id.len == 0) return error.InvalidVersion;

// Identifiers MUST comprise only ASCII alphanumerics and hyphens [0-9A-Za-z-].
for (id) |c| if (!std.ascii.isAlNum(c) and c != '-') return error.InvalidVersion;
for (id) |c| if (!std.ascii.isAlphanumeric(c) and c != '-') return error.InvalidVersion;
}
}

Expand Down
Loading