Commit graph

51 commits

Author SHA1 Message Date
jmdavis
0e1afe82cb Improved std.string.indexOf and std.string.lastIndexOf.
indexOf and lastIndexOf should not work properly with unicode for all
string types (unlike before). As part of that, I also ended up fixing a
bug in std.array.back for strings (wstrings in particular were broken).
I also improved various, related unit tests.
2011-06-12 16:59:50 -07:00
blackwhale
903738f786 another attempt at stride/strideBack 2011-05-27 18:50:14 +04:00
blackwhale
a4cf6d203b strideBack. make all strides work with mutable strings. style. 2011-05-27 17:21:18 +04:00
Walter Bright
046e1b36db add source links 2011-02-06 15:46:50 -08:00
Don Clugston
84477a5d3e Move Boost copyright declaration from ddoc to normal comment. Fixes ugly ddoc output. 2010-11-24 19:34:47 +00:00
Masahiro Nakagawa
3dbdfbfdf6 Workaround for dmd 2.050. 2010-11-24 13:51:26 +00:00
Masahiro Nakagawa
9ac23bf4d8 issue 5247: std.utf.stride() should not return 0xFF 2010-11-23 11:42:57 +00:00
Masahiro Nakagawa
44f8ab9581 Clean up std.utf. Remove UtfError and toUTF* shortcut functions. Add attributes. count function supports dchar 2010-11-23 10:28:07 +00:00
Andrei Alexandrescu
460c844b4f Fix for bugzilla 2718 2010-09-26 21:19:14 +00:00
Andrei Alexandrescu
1e4fd1db4e Bugzilla 755 2010-09-14 03:31:16 +00:00
Andrei Alexandrescu
432e3fdfc8 Replaced std.contracts with std.exception throughout 2010-07-04 22:09:03 +00:00
Shin Fujishiro
b5a054159c Fixed bugzilla 978: std.utf's toUTF* functions accept some invalid and reject some valid UTF.
* Fixed decode() to accept U+FFFE and U+FFFF.
* Changed some assert contracts (which check input for validity) to if-throw.
* Fixed static array argument to be passed by ref (regression).
2010-06-23 03:03:56 +00:00
Lars T. Kyllingstad
5e624d18c2 2275 - std.utf.toUTF16z() should return const(wchar)* 2010-06-14 13:40:18 +00:00
Andrei Alexandrescu
c3e79d1616 Eliminated decodeFront() and decodeBack() - they aren't needed since strings are bidirectional ranges. 2010-06-08 17:37:58 +00:00
Walter Bright
53a3eec534 invariant => immutable 2010-05-05 22:19:49 +00:00
Andrei Alexandrescu
2a9a6e336c string, wstring are now bidirectional (not random) ranges
std.algorithm: defined move with one argument; levenshtein distance generalized to with all forward ranges; take now has swapped arguments
std.array: empty for arrays is now a @property; front and back for a string and wstring automatically decodes the first/last character; popFront, popBack for string and wstring obey the UTF stride
std.conv: changed the default array formatting from "[a, b, c]" to "a b c"
std.range: swapped order of arguments in take
std.stdio: added readln template
std.variant: now works with statically-sized arrays and const data
std.traits: added isNarrowString
2010-02-22 15:52:31 +00:00
Walter Bright
d340dab9f3 inout to ref 2009-12-19 07:46:41 +00:00
Don Clugston
0ecae3a354 Change [length] to [$] throughout Phobos. 2009-11-03 07:55:49 +00:00
Andrei Alexandrescu
904f56e34a Added count function and changed the encode function to take fixed-size array by reference. 2009-10-27 03:28:06 +00:00
Walter Bright
478c52201b update for value static arrays 2009-10-24 02:38:26 +00:00
Andrei Alexandrescu
93cca46ecc fixed decodeFront and decodeBack 2009-10-03 21:47:54 +00:00
Walter Bright
dbf4772242 wrong return type in std.utf 2009-09-30 02:25:14 +00:00
Sean Kelly
747f3cf1e4 Changed Phobos to use the Boost license. Currently, all public domain modules and all licensed modules by Walter, Andrei, Bartosz, and Don have been changed to use this license (excepting std.c, for the moment). Ideally, all Phobos modules will eventually be distributed under this license, which means obtaining permission from a few more authors, deleting, or rewriting some modules.
Removed std.openrj.
2009-09-16 18:19:51 +00:00
Andrei Alexandrescu
bbbce419ab improved error messages. 2009-07-04 07:10:14 +00:00
Andrei Alexandrescu
7b69dabc20 Added encode() with fixed-size arrays. 2009-04-29 22:05:05 +00:00
Andrei Alexandrescu
ff252e5b2f * toUTF16z accepts in char[] 2009-04-06 18:33:41 +00:00
Andrei Alexandrescu
1ae5300f52 * std.algorithm: Changed the map() function so that it deduces the return type
* 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.
2008-05-06 05:08:52 +00:00
Walter Bright
b2a37b2833 updates for new const regime 2007-12-21 00:01:31 +00:00
Brad Roberts
a9bc53273c merge r387:397 from candidate to trunk
-- new module std.contracts
  -- migrate callers to it where appropriate
2007-10-14 23:04:19 +00:00
Brad Roberts
eec6be69ed Merge r297:387 from candidate to trunk.
-- add std.getopt
  -- add std.variant
  -- switch strings over to be invariant rather than const
  -- hopefully the last big linux makefile overhaul
  -- fix for bug 1579: write[ln] fails for obj.toString()
  -- fix negative precision handling in std.format
  -- add some file and directory iterator helpers
  -- among other little changes here and there...
2007-10-14 09:22:50 +00:00
Brad Roberts
8f79f3ec35 phobos 2.003 2007-09-10 07:28:23 +00:00
Brad Roberts
de971890b0 phobos 2.000 2007-09-10 06:45:08 +00:00
Brad Roberts
1de7f2e4ba phobos 1.007 2007-09-10 06:02:02 +00:00
Brad Roberts
7371485bf8 phobos 0.177 2007-09-10 05:36:45 +00:00
Brad Roberts
7b6d43bcb5 phobos 0.166 2007-09-10 05:29:38 +00:00
Brad Roberts
b76c21ccf9 phobos 0.161 2007-09-10 05:24:49 +00:00
Brad Roberts
d6ac036aff phobos 0.149 2007-09-10 05:11:52 +00:00
Brad Roberts
110cfd9da7 phobos 0.148 2007-09-10 05:04:40 +00:00
Brad Roberts
b029d8c452 phobos 0.147 2007-09-10 05:03:22 +00:00
Brad Roberts
98e28b66e3 phobos 0.140 2007-09-10 04:57:07 +00:00
Brad Roberts
f5e542b7da phobos 0.114 2007-09-10 04:31:54 +00:00
Brad Roberts
6cf33ed508 phobos 0.111 2007-09-10 04:28:31 +00:00
Brad Roberts
1e837465b9 phobos 0.101 2007-09-10 04:11:50 +00:00
Brad Roberts
f86a362105 phobos 0.97 2007-09-10 04:05:31 +00:00
Brad Roberts
2fd7d60c13 phobos 0.96 2007-09-10 04:05:01 +00:00
Brad Roberts
5a51fc091f phobos 0.95 2007-09-10 04:04:16 +00:00
Brad Roberts
99f2734db6 phobos 0.88 2007-09-10 03:56:33 +00:00
Brad Roberts
224c570c1b phobos 0.78 2007-09-10 03:43:40 +00:00
Brad Roberts
c53c12f16c phobos 0.77 2007-09-10 03:41:43 +00:00
Brad Roberts
35a12fec2f phobos 0.76 2007-09-10 03:11:55 +00:00