mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 06:30:28 +03:00
Added more deprecation messages.
This commit is contained in:
parent
0db13f5966
commit
3d92608c47
6 changed files with 42 additions and 34 deletions
48
std/ctype.d
48
std/ctype.d
|
@ -21,117 +21,124 @@ module std.ctype;
|
|||
|
||||
import std.ascii;
|
||||
|
||||
pragma(msg, "Notice: As of Phobos 2.058, std.ctype has been " ~
|
||||
"deprecated. It will be removed in March 2013. " ~
|
||||
"Please use std.ascii instead.");
|
||||
|
||||
deprecated:
|
||||
|
||||
/**
|
||||
* $(RED Deprecated. It will be removed in September 2012. Please use
|
||||
* $(RED Deprecated. It will be removed in March 2013. Please use
|
||||
* $(D std.ascii.isAlphaNum) instead.)
|
||||
*
|
||||
* Returns !=0 if c is a letter in the range (0..9, a..z, A..Z).
|
||||
*/
|
||||
deprecated("Please use std.ascii.isAlphaNum instead.")
|
||||
pure int isalnum(dchar c) { return (c <= 0x7F) ? _ctype[c] & (_ALP|_DIG) : 0; }
|
||||
|
||||
/**
|
||||
* $(RED Deprecated. It will be removed in September 2012. Please use
|
||||
* $(RED Deprecated. It will be removed in March 2013. Please use
|
||||
* $(D std.ascii.isAlpha) instead.)
|
||||
*
|
||||
* Returns !=0 if c is an ascii upper or lower case letter.
|
||||
*/
|
||||
deprecated("Please use std.ascii.isAlpha instead.")
|
||||
pure int isalpha(dchar c) { return (c <= 0x7F) ? _ctype[c] & (_ALP) : 0; }
|
||||
|
||||
/**
|
||||
* $(RED Deprecated. It will be removed in September 2012. Please use
|
||||
* $(RED Deprecated. It will be removed in March 2013. Please use
|
||||
* $(D std.ctype.ascii.isControl) instead.)
|
||||
*
|
||||
* Returns !=0 if c is a control character.
|
||||
*/
|
||||
deprecated("Please use std.ascii.isControl instead.")
|
||||
pure int iscntrl(dchar c) { return (c <= 0x7F) ? _ctype[c] & (_CTL) : 0; }
|
||||
|
||||
/**
|
||||
* $(RED Deprecated. It will be removed in September 2012. Please use
|
||||
* $(RED Deprecated. It will be removed in March 2013. Please use
|
||||
* $(D std.ascii.isDigit) instead.)
|
||||
*
|
||||
* Returns !=0 if c is a digit.
|
||||
*/
|
||||
deprecated("Please use std.ascii.isDigit instead.")
|
||||
pure int isdigit(dchar c) { return (c <= 0x7F) ? _ctype[c] & (_DIG) : 0; }
|
||||
|
||||
/**
|
||||
* $(RED Deprecated. It will be removed in September 2012. Please use
|
||||
* $(RED Deprecated. It will be removed in March 2013. Please use
|
||||
* $(D std.ascii.isLower) instead.)
|
||||
*
|
||||
* Returns !=0 if c is lower case ascii letter.
|
||||
*/
|
||||
deprecated("Please use std.ascii.isLower instead.")
|
||||
pure int islower(dchar c) { return (c <= 0x7F) ? _ctype[c] & (_LC) : 0; }
|
||||
|
||||
/**
|
||||
* $(RED Deprecated. It will be removed in September 2012. Please use
|
||||
* $(RED Deprecated. It will be removed in March 2013. Please use
|
||||
* $(D std.ascii.isPunctuation) instead.)
|
||||
*
|
||||
* Returns !=0 if c is a punctuation character.
|
||||
*/
|
||||
deprecated("Please use std.ascii.isPunctuation instead.")
|
||||
pure int ispunct(dchar c) { return (c <= 0x7F) ? _ctype[c] & (_PNC) : 0; }
|
||||
|
||||
/**
|
||||
* $(RED Deprecated. It will be removed in September 2012. Please use
|
||||
* $(RED Deprecated. It will be removed in March 2013. Please use
|
||||
* $(D std.ascii.isWhite) instead.)
|
||||
*
|
||||
* Returns !=0 if c is a space, tab, vertical tab, form feed,
|
||||
* carriage return, or linefeed.
|
||||
*/
|
||||
deprecated("Please use std.ascii.isWhite instead.")
|
||||
pure int isspace(dchar c) { return (c <= 0x7F) ? _ctype[c] & (_SPC) : 0; }
|
||||
|
||||
/**
|
||||
* $(RED Deprecated. It will be removed in September 2012. Please use
|
||||
* $(RED Deprecated. It will be removed in March 2013. Please use
|
||||
* $(D std.ascii.isUpper) instead.)
|
||||
*
|
||||
* Returns !=0 if c is an upper case ascii character.
|
||||
*/
|
||||
deprecated("Please use std.ascii.isUpper instead.")
|
||||
pure int isupper(dchar c) { return (c <= 0x7F) ? _ctype[c] & (_UC) : 0; }
|
||||
|
||||
/**
|
||||
* $(RED Deprecated. It will be removed in September 2012. Please use
|
||||
* $(RED Deprecated. It will be removed in March 2013. Please use
|
||||
* $(D std.ascii.isHexDigit) instead.)
|
||||
*
|
||||
* Returns !=0 if c is a hex digit (0..9, a..f, A..F).
|
||||
*/
|
||||
deprecated("Please use std.ascii.isHexDigit instead.")
|
||||
pure int isxdigit(dchar c) { return (c <= 0x7F) ? _ctype[c] & (_HEX) : 0; }
|
||||
|
||||
/**
|
||||
* $(RED Deprecated. It will be removed in September 2012. Please use
|
||||
* $(RED Deprecated. It will be removed in March 2013. Please use
|
||||
* $(D std.ascii.isGraphical) instead.)
|
||||
*
|
||||
* Returns !=0 if c is a printing character except for the space character.
|
||||
*/
|
||||
deprecated("Please use std.ascii.isGraphical instead.")
|
||||
pure int isgraph(dchar c) { return (c <= 0x7F) ? _ctype[c] & (_ALP|_DIG|_PNC) : 0; }
|
||||
|
||||
/**
|
||||
* $(RED Deprecated. It will be removed in September 2012. Please use
|
||||
* $(RED Deprecated. It will be removed in March 2013. Please use
|
||||
* $(D std.ascii.isPrintable) instead.)
|
||||
*
|
||||
* Returns !=0 if c is a printing character including the space character.
|
||||
*/
|
||||
deprecated("Please use std.ascii.isPrintable instead.")
|
||||
pure int isprint(dchar c) { return (c <= 0x7F) ? _ctype[c] & (_ALP|_DIG|_PNC|_BLK) : 0; }
|
||||
|
||||
/**
|
||||
* $(RED Deprecated. It will be removed in September 2012. Please use
|
||||
* $(RED Deprecated. It will be removed in March 2013. Please use
|
||||
* $(D std.ascii.isASCII) instead.)
|
||||
*
|
||||
* Returns !=0 if c is in the ascii character set, i.e. in the range 0..0x7F.
|
||||
*/
|
||||
deprecated("Please use std.ascii.isASCII instead.")
|
||||
pure int isascii(dchar c) { return c <= 0x7F; }
|
||||
|
||||
|
||||
/**
|
||||
* $(RED Deprecated. It will be removed in September 2012. Please use
|
||||
* $(RED Deprecated. It will be removed in March 2013. Please use
|
||||
* $(D std.ascii.toLower) instead.)
|
||||
*
|
||||
* If c is an upper case ascii character,
|
||||
* return the lower case equivalent, otherwise return c.
|
||||
*/
|
||||
deprecated("Please use std.ascii.toLower instead.")
|
||||
pure dchar tolower(dchar c)
|
||||
{
|
||||
return std.ascii.toLower(c);
|
||||
|
@ -139,12 +146,13 @@ pure dchar tolower(dchar c)
|
|||
|
||||
|
||||
/**
|
||||
* $(RED Deprecated. It will be removed in September 2012. Please use
|
||||
* $(RED Deprecated. It will be removed in March 2013. Please use
|
||||
* $(D std.ascii.toUpper) instead.)
|
||||
*
|
||||
* If c is a lower case ascii character,
|
||||
* return the upper case equivalent, otherwise return c.
|
||||
*/
|
||||
deprecated("Please use std.ascii.toUpper instead.")
|
||||
pure dchar toupper(dchar c)
|
||||
{
|
||||
return std.ascii.toUpper(c);
|
||||
|
|
|
@ -7393,7 +7393,7 @@ assert(SysTime(DateTime(2000, 6, 4, 12, 22, 9)).daysInMonth == 30);
|
|||
}
|
||||
|
||||
//Explicitly undocumented. Do not use. To be removed in March 2013.
|
||||
deprecated @property ubyte endOfMonthDay() const nothrow
|
||||
deprecated("Please use daysInMonth instead.") @property ubyte endOfMonthDay() const nothrow
|
||||
{
|
||||
return Date(dayOfGregorianCal).daysInMonth;
|
||||
}
|
||||
|
@ -12403,7 +12403,7 @@ assert(Date(2000, 6, 4).daysInMonth == 30);
|
|||
}
|
||||
|
||||
//Explicitly undocumented. Do not use. To be removed in March 2013.
|
||||
deprecated @property ubyte endOfMonthDay() const pure nothrow
|
||||
deprecated("Please use daysInMonth instead.") @property ubyte endOfMonthDay() const nothrow
|
||||
{
|
||||
return maxDay(_year, _month);
|
||||
}
|
||||
|
@ -17293,7 +17293,7 @@ assert(DateTime(Date(2000, 6, 4), TimeOfDay(12, 22, 9)).daysInMonth == 30);
|
|||
}
|
||||
|
||||
//Explicitly undocumented. Do not use. To be removed in March 2013.
|
||||
deprecated @property ubyte endOfMonthDay() const pure nothrow
|
||||
deprecated("Please use daysInMonth instead.") @property ubyte endOfMonthDay() const nothrow
|
||||
{
|
||||
return _date.daysInMonth;
|
||||
}
|
||||
|
|
|
@ -3361,7 +3361,7 @@ Take!(Repeat!T) repeat(T)(T value, size_t n)
|
|||
$(RED Deprecated. It will be removed in January 2013.
|
||||
Please use $(LREF repeat) instead.)
|
||||
+/
|
||||
deprecated Take!(Repeat!T) replicate(T)(T value, size_t n)
|
||||
deprecated("Please use std.range.repeat instead.") Take!(Repeat!T) replicate(T)(T value, size_t n)
|
||||
{
|
||||
return repeat(value, n);
|
||||
}
|
||||
|
@ -7174,7 +7174,7 @@ sgi.com/tech/stl/binary_search.html, binary_search).
|
|||
$(RED Deprecated. It will be removed in January 2013.
|
||||
Please use $(LREF contains) instead.)
|
||||
+/
|
||||
deprecated alias contains canFind;
|
||||
deprecated("Please use contains instead.") alias contains canFind;
|
||||
}
|
||||
|
||||
// Doc examples
|
||||
|
|
|
@ -150,7 +150,7 @@ class SocketException: Exception
|
|||
*
|
||||
* Provided for compatibility with older code using $(D SocketException).
|
||||
*/
|
||||
deprecated @property int errorCode() const
|
||||
deprecated("Please use std.socket.SocketOSException instead.") @property int errorCode() const
|
||||
{
|
||||
auto osException = cast(SocketOSException)this;
|
||||
if (osException)
|
||||
|
@ -1911,7 +1911,7 @@ struct TimeVal
|
|||
$(RED Deprecated. It will be removed in January 2013.
|
||||
Please use $(LREF TimeVal) instead.)
|
||||
+/
|
||||
deprecated alias TimeVal timeval;
|
||||
deprecated("Please use std.socket.TimeVal instead.") alias TimeVal timeval;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -2142,7 +2142,7 @@ struct Linger
|
|||
$(RED Deprecated. It will be removed in January 2013.
|
||||
Please use $(LREF Linger) instead.)
|
||||
+/
|
||||
deprecated alias Linger linger;
|
||||
deprecated("Please use std.socket.Linger instead.") alias Linger linger;
|
||||
|
||||
/// Specifies a socket option:
|
||||
enum SocketOption: int
|
||||
|
|
10
std/uni.d
10
std/uni.d
|
@ -45,7 +45,7 @@ bool isWhite(dchar c) @safe pure nothrow
|
|||
|
||||
|
||||
//Explicitly undocumented. Do not use. To be removed in March 2013.
|
||||
deprecated bool isUniLower(dchar c) @safe pure nothrow
|
||||
deprecated("Please use std.uni.isLower instead.") bool isUniLower(dchar c) @safe pure nothrow
|
||||
{
|
||||
return isLower(c);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ bool isLower(dchar c) @safe pure nothrow
|
|||
|
||||
|
||||
//Explicitly undocumented. Do not use. To be removed in March 2013.
|
||||
deprecated bool isUniUpper(dchar c) @safe pure nothrow
|
||||
deprecated("Please use std.uni.isUpper instead.") bool isUniUpper(dchar c) @safe pure nothrow
|
||||
{
|
||||
return isUpper(c);
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ bool isUpper(dchar c) @safe pure nothrow
|
|||
|
||||
|
||||
//Explicitly undocumented. Do not use. To be removed in March 2013.
|
||||
deprecated dchar toUniLower(dchar c) @safe pure nothrow
|
||||
deprecated("Please use std.uni.toLower instead.") dchar toUniLower(dchar c) @safe pure nothrow
|
||||
{
|
||||
return toLower(c);
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ dchar toLower(dchar c) @safe pure nothrow
|
|||
|
||||
|
||||
//Explicitly undocumented. Do not use. To be removed in March 2013.
|
||||
deprecated dchar toUniUpper(dchar c) @safe pure nothrow
|
||||
deprecated("Please use std.uni.toUpper instead.") dchar toUniUpper(dchar c) @safe pure nothrow
|
||||
{
|
||||
return toUpper(c);
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ dchar toUpper(dchar c) @safe pure nothrow
|
|||
|
||||
|
||||
//Explicitly undocumented. Do not use. To be removed in March 2013.
|
||||
deprecated bool isUniAlpha(dchar c) @safe pure nothrow
|
||||
deprecated("Please use std.uni.isAlpha instead.") bool isUniAlpha(dchar c) @safe pure nothrow
|
||||
{
|
||||
return isAlpha(c);
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ class UTFException : Exception
|
|||
$(RED Deprecated. It will be removed in January 2013.
|
||||
Please use $(LREF UTFException) instead.)
|
||||
+/
|
||||
deprecated alias UTFException UtfException;
|
||||
deprecated("Please use std.utf.UTFException instead.") alias UTFException UtfException;
|
||||
|
||||
|
||||
/++
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue