Commit graph

315 commits

Author SHA1 Message Date
jmdavis
84f1329cbb Renamed isUniAlpha to isAlpha.
isUniAlpha is now scheduled for deprecation.
2011-06-22 20:46:34 -07:00
jmdavis
0ca76972fe Renamed toUniLower and toUniUpper to toLower and toUpper.
toUniLower and toUniUpper are now scheduled for deprecation.
2011-06-22 20:34:08 -07:00
jmdavis
e3f7c0c288 Renamed isUniWhite to isWhite. 2011-06-22 19:44:36 -07:00
jmdavis
15fb65f1bb Reverted toAsciiLower and toAsciiUpper to toLower and toUpper. 2011-06-22 19:22:27 -07:00
jmdavis
2d310e5e20 Changed the names of some of the std.ascii functions.
isWhite, isLower, isUpper, toLower, and toUpper now have Ascii in their
name, which matches what std.unit does with its versions of those
functions. Hopefully, it should also reduce bugs due to using the wrong
function between the ASCII and unicode versions by making the difference
more obvious.
2011-06-19 18:41:00 -07:00
jmdavis
213c064e70 Reverted change from toStringz to toStringZ.
There was no consenus in the newsgroup about what to do about renaming
toStringz to be properly camelcased. It was pretty much divided between
renaming it to toCString and leaving it exactly as-is. No one wanted it
to be toStringZ. So, given the lack of consensus, I'm just going to
leave it as toStringz.
2011-06-18 01:13:21 -07:00
jmdavis
dd3a0c20a2 Created std.ascii to replace std.ctype.
All of the new, properly camelcased functions in std.ctype have been
moved to std.ascii, and std.ctype has been scheduled for deprecation.
2011-06-14 04:06:54 -07:00
jmdavis
7d5c1831e5 Replaced calls to toStringz with toStringZ. 2011-06-12 16:59:52 -07:00
jmdavis
447ce1db96 Replaced uses of std.string constants which are scheduled for deprecation.
I also replaced the std.string constants which have the same name as the
their std.ctype counterparts so that code doesn't break which imports
both std.string and std.ctype.
2011-06-12 16:59:52 -07:00
jmdavis
30069ea6f0 Replaced calls to std.string and std.ctype's toupper with their toUpper counterparts. 2011-06-12 16:59:52 -07:00
jmdavis
654f35a677 Replaced calls to std.string and std.ctype's tolower with their toLower counterparts. 2011-06-12 16:59:52 -07:00
jmdavis
11cdd6ce17 Replaced calls to std.ctype.isxdigit with isHexDigit. 2011-06-12 16:59:51 -07:00
jmdavis
19ae2b4998 Replace calls to std.ctype.isdigt with std.ctype.isDigit. 2011-06-12 16:59:51 -07:00
jmdavis
3d3c342a69 Replaced calls to std.ctype.isalnum and std.ctype.isalpha. 2011-06-12 16:59:50 -07:00
jmdavis
76e1cfd2e9 Replaced calls to std.ctype.isspace with std.ctype.isWhite.
In a few places, I replaced it with std.uni.isUniWhite, but for the most
part, I replaced it with std.ctype.isWhite.
2011-06-12 16:59:50 -07:00
Andrei Alexandrescu
0812b4f505 Faster and smaller write/writeln for integrals 2011-06-06 22:18:33 -05:00
Walter Bright
5a517b0095 remove case fallthrough 2011-06-03 19:41:52 -07:00
David Nadlinger
9179668818 Enum formatting: Do not fail on values not corresponding to a member.
Instead, »cast(EnumType)rawValue« is printed/returned for these cases.
2011-05-31 22:40:38 +02:00
Andrei Alexandrescu
3e6679b297 Improvements to std.range and std.algorithm 2011-04-04 00:44:59 -05:00
Andrei Alexandrescu
c3b7665a42 Merge branch 'work' of github.com:andralex/phobos into work
Conflicts:
	posix.mak
	std/algorithm.d
	std/conv.d
	std/datetime.d
	std/range.d
2011-02-27 15:25:59 -06:00
Andrei Alexandrescu
1083bd4e7b One pass through std.range and friends
* Made emplace faster and replaced calls to it to also make them faster.

* Replaced phobos.d in posix.mak with index.d.

* Added version=StdDdoc to documentation build in posix.mak, and replaced uses of D_Ddoc with it.

* Improved documentation target in posix.mak (target dir automatically created).

* Added nice documentation table and cheat sheet at the top of std.algorithm.

* Replaced a few helper structs in std.range and std.algorithm with local structs, which simplify matters a fair amount.

* Added more constraints to functions in std.algorithm (still work in progress).

* Improved error message in std.algorithm.sort in case of failure to sort.

* std.random.dice(1, 10) now works (no need for array notation std.random.dice([1, 10])).

* Fixed documentation bugs and insufficiencies in std.range (still more to do).

* Improved speed of walkLength.

* Simplified retro.

* Simplified and optimized stride. Also folded stride(stride(r, a), b) into stride(r, a * b).

* Added roundRobin to std.range, which as a perk simplified radial.

* Added takeOne and takeNone to std.range.

* Added unsigned to std.traits.
2011-02-27 12:38:49 -06:00
Andrei Alexandrescu
78b3f24604 One pass through std.range and friends
* Made emplace faster and replaced calls to it to also make them faster.

* Replaced phobos.d in posix.mak with index.d.

* Added version=StdDdoc to documentation build in posix.mak, and replaced uses of D_Ddoc with it.

* Improved documentation target in posix.mak (target dir automatically created).

* Added nice documentation table and cheat sheet at the top of std.algorithm.

* Replaced a few helper structs in std.range and std.algorithm with local structs, which simplify matters a fair amount.

* Added more constraints to functions in std.algorithm (still work in progress).

* Improved error message in std.algorithm.sort in case of failure to sort.

* std.random.dice(1, 10) now works (no need for array notation std.random.dice([1, 10])).

* Fixed documentation bugs and insufficiencies in std.range (still more to do).

* Improved speed of walkLength.

* Simplified retro.

* Simplified and optimized stride. Also folded stride(stride(r, a), b) into stride(r, a * b).

* Added roundRobin to std.range, which as a perk simplified radial.

* Added takeOne and takeNone to std.range.

* Added unsigned to std.traits.
2011-02-26 15:19:35 -06:00
Walter Bright
046e1b36db add source links 2011-02-06 15:46:50 -08:00
Andrei Alexandrescu
9e15909243 Fix for issue 5152 2011-01-22 23:56:12 +00:00
Andrei Alexandrescu
a474a386d4 Fix for bug 4922 2011-01-22 06:35:11 +00:00
Andrei Alexandrescu
6462d38a07 http://d.puremagic.com/issues/show_bug.cgi?id=3317 2011-01-09 21:44:03 +00:00
Andrei Alexandrescu
ff7f7039d1 http://d.puremagic.com/issues/show_bug.cgi?id=3369 2011-01-09 07:00:39 +00:00
Andrei Alexandrescu
86a080f056 Fixed unlisted bug in readf 2010-12-24 03:05:42 +00:00
Shin Fujishiro
792cdaf467 Bug 5220: Make std.conv.ConvError an Exception instead of an Error
Renamed ConvError -> ConvException.
2010-11-16 20:39:50 +00:00
Shin Fujishiro
d5bf86e1d8 Fixed bug 4445: roundTo!ubyte(255.0) throws.
to!ubyte(255.0+0.5) overflows.  This change applies std.math.round() to the argument to prevent the overflow, and makes roundTo() behave like std.math.lround().

I left to!ubyte(255.5), to!ubyte(255.1) etc. throwing.
2010-11-16 20:39:16 +00:00
Lars T. Kyllingstad
7c67d7a9bc 4959: std.conv.parse error "no digits seen" on string starting with zero 2010-09-30 13:42:58 +00:00
Andrei Alexandrescu
98a9719f42 Fix for fix for bugzilla 1733 2010-09-26 19:03:48 +00:00
Andrei Alexandrescu
8692f08f19 Fix for bugzilla 1733 2010-09-26 19:02:37 +00:00
Andrei Alexandrescu
90438d574d Fix for bugzilla 2310 2010-09-26 18:27:45 +00:00
David Simcha
b597d23f83 Bug 4888: Heavy reliance on Bug 3534 in Phobos range usage. I used a different approach here than the first one I tried. I only did what was necessary to make Phobos work instead of trying to fix the deeper issue of making std.algorithm to work w/ const/immutable arrays. 2010-09-18 21:00:52 +00:00
David Simcha
ab60a7d7a1 Fix std.range.Zip. 2010-09-18 00:48:42 +00:00
Andrei Alexandrescu
1515e2139f Fix breaking unittests 2010-09-13 13:37:16 +00:00
Andrei Alexandrescu
611f5a1c22 Generalized to having string types as target to accept input ranges of character types 2010-09-13 01:21:04 +00:00
Andrei Alexandrescu
249056c61d Added convenience overload for emplace() 2010-09-08 13:05:04 +00:00
Shin Fujishiro
95125b3077 std.conv: enh 4518 (diagnostic)
- Improved the error message of enum->string conversion failure to report the actual value encountered.
- Cleaned up the impl. of enum<->string converters with EnumMembers.
2010-09-05 01:40:07 +00:00
David Simcha
47743cc50e Small unlisted std.conv bug: to!string(pointer) doesn't work for void*. 2010-08-29 22:18:53 +00:00
Shin Fujishiro
54b7c22526 Workaround for ICE bug 4738. 2010-08-27 03:44:15 +00:00
Walter Bright
b8ce58ccd1 detab sources 2010-08-23 02:14:45 +00:00
Andrei Alexandrescu
3f2b8c12ea 64-bit compatibility work 2010-08-22 20:55:22 +00:00
David Simcha
9ce4fbb9f3 Bug 4700: to!float("0") fails 2010-08-22 01:54:08 +00:00
Andrei Alexandrescu
75705bc9e7 added assert 2010-08-18 02:44:35 +00:00
Andrei Alexandrescu
810c4feb97 bugzilla 4671 2010-08-18 02:35:22 +00:00
David Simcha
2354773823 Fix unittest so it works even when errno is set elsewhere under completely unrelated circumstances. 2010-08-12 01:56:15 +00:00
Andrei Alexandrescu
b098c9a358 All enforce calls throw ConvError 2010-08-08 06:33:06 +00:00
Andrei Alexandrescu
8842122477 Debug aides and fix for invalid code that the compiler accepts 2010-08-08 01:13:55 +00:00