Skip to content

Commit 5b8b6ed

Browse files
committed
Add deprecation notices for the original declarations
1 parent dfedf7c commit 5b8b6ed

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

lib/std/ascii.zig

+19
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,25 @@ const std = @import("std");
1010
const mem = std.mem;
1111
const testing = std.testing;
1212

13+
// TODO: remove these after the release of 0.10.0
14+
const isAlNum = @compileError("deprecated: use isAlphanumeric");
15+
const eqlIgnoreCase = @compileError("deprecated: use eqlInsensitive");
16+
const isPrint = @compileError("deprecated: use isPrintable");
17+
const startsWithIgnoreCase = @compileError("deprecated: use startsWithInsensitive");
18+
const lessThanIgnoreCase = @compileError("deprecated: use lessThanInsensitive");
19+
const orderIgnoreCase = @compileError("deprecated: use orderInsensitive");
20+
const indexOfIgnoreCase = @compileError("deprecated: use indexOfInsensitive");
21+
const indexOfIgnoreCasePos = @compileError("deprecated: use indexOfInsensitivePos");
22+
const endsWithIgnoreCase = @compileError("deprecated: use endsWithInsensitive");
23+
const control_code = @compileError("deprecated: use control");
24+
const isBlank = @compileError("deprecated: use `char == ' ' or char == '\t'`");
25+
const isXDigit = @compileError("deprecated: use isHexadecimal");
26+
const isCntrl = @compileError("deprecated: use isControl");
27+
const isAlpha = @compileError("deprecated: use isAlphabetic");
28+
const isSpace = @compileError("deprecated: use isWhitespace");
29+
const spaces = @compileError("deprecated: use whitespace");
30+
const isPunct = @compileError("deprecated: write your own function suited to your particular case");
31+
1332
/// Contains constants for the C0 control codes of the ASCII encoding.
1433
///
1534
/// See also: https://en.wikipedia.org/wiki/C0_and_C1_control_codes and `is_control`

0 commit comments

Comments
 (0)