Removed buffer arg from std.xml.encode since most of the time the data is string data, and the buffer was defined as the same type.
Fixed std.format unittests to not use string-based appenders, since they now cannot be rewritten.
- Applied Michael Rynn's contribution to isChar(), isDigit() and isIdeographic(). Now these functions are hard-coded for performance. Profiling showed that this code was three times faster than the old one.
- IdeographicTable must be sorted for lookup().
Thanks to Rainer Schuetze for the patch!
Line 994: Here, we are decoding input, not encoding.
Line 1948: The text (pointed to by p) should be decoded.
In addition to the proposed patch, I explicitly specified DecodeMode.LOOSE as done in other parts of this module. And I added Jesse Phillips' test case as a unittest.
* std.contracts: Added file and line information to enforce. Added errnoEnforce that reads and formats a message according to errno. Added corresponding ErrnoException class.
* std.encoding: For now commented out std.encoding.to.
* std.file: Fixed bug 2065
* std.format: Fixed bug in raw write for arrays
* std.getopt: Added new option stopOnFirstNonOption. Also automatically expand dubious option groups with embedded in them (useful for shebang scripts)
* std.math: improved integral powers
* std.md5: Improved signature of sum so it takes multiple arrays. Added getDigestString.
* std.path: changed signatures of test functions from bool to int. Implemented rel2abs for Windows. Improved join so that it accepts multiple paths. Got rid of some gotos with the help of scope statements.
* std.process: added getenv and setenv. Improved system() so it returns the exit code correctly on Linux.
* std.random: added the dice function - a handy (possibly biased) dice.
* std.file: added support for opening large files (not yet tested)
* std.utf: added the codeLength function. Got rid of some gotos.
Reformatted to fit in 80 columns
Documentation improved
Default handlers removed (speed optimization)
Text decoding now optional (speed optimization)
pretty() now prettier
Now has DOM functionality
(1) Text handler did not decode text before passing to user. Now it does.
(2) When using nested handlers, the parse position was not correctly updated. Now it is.
Also, the unit test which Andrei commented out has been modified and uncommented. Hopefully that should work for everybody now.