Commit graph

129 commits

Author SHA1 Message Date
monarch dodra
3c92edeb3b Merge pull request #2038 from blackwhale/issue-12419
Fix issue 12419: assertion failure in std.utf
2014-03-24 18:51:23 +00:00
Dmitry Olshansky
0f0511f81b fix issue 12419
Test that UTF-8 decoding yields a value in the valid range.
UTF-8 may encode values beyond these covered by [0, 0x10FFFF].
2014-03-24 20:02:51 +04:00
Tomoya Tanjo
4d7ccff58b Make std.utf.toUTFz safe and pure 2014-03-19 11:37:57 +07:00
Yazan S. Dabain
a81f6200cf [Trivial] Fix documentation typos 2014-02-28 21:08:19 +02:00
Daniel Murphy
4d0892baba Remove uses of the comma operator 2014-02-18 00:48:40 +11:00
k-hara
b00f09b8e8 fix more import insufficiency 2013-12-30 17:30:26 +09:00
jmdavis
efd6ea0cbf Move various deprecations along. 2013-12-11 23:44:12 -08:00
monarchdodra
ed1cfe527b Introduce package level canSearchInCodeUnits
And use it to solve bugs/simplify code.
2013-11-13 17:13:36 +01:00
k-hara
bf9676b0cf Remove conflict template function
By fixing bug 10811, both toUTFz template functions will conflict on the call `toUTFz!(T)(str)`. Remove one to resolve ambiguity.
2013-08-13 15:03:04 +09:00
k-hara
6b75278389 Make std.utf module CTFEable 2013-07-31 19:24:21 +09:00
k-hara
5490f90f06 [trivial] unittest code clean up 2013-07-31 19:24:20 +09:00
k-hara
f04efad55a [trivial] Use ddoc unittest 2013-07-31 19:24:20 +09:00
k-hara
be7e1b0cee [trivial] fix code style 2013-07-31 19:23:53 +09:00
k-hara
a5ee921f7d fix Issue 10732 - Example code for std.utf.toUTFindex does not work 2013-07-31 19:23:43 +09:00
k-hara
92bef24f2f fix Issue 10254 - Purity correctness is broken with constructor 2013-06-20 10:54:30 +09:00
jmdavis
ce1b2294b0 Undocument some deprecated functions.
They were marked for removal in the docs (many of them were intended to
be removed in January), so now they've been removed from the docs and
marked for removal from the code in November.
2013-05-05 16:34:25 -07:00
jmdavis
3738fdc476 Minor tweak to decodeFront per review. 2013-03-03 19:25:01 -08:00
jmdavis
932a509dba Swap a couple of overloads in std.utf.
This makes no semantic difference to the code, but it makes it so that
the attributes which are on one of the overloads don't make it into the
documentation (where they would imply that all of the overloads have
those attributes, which is not correct).
2013-03-03 19:25:01 -08:00
jmdavis
aae9d3806a Fix for issue# 9456.
This change makes it so that decodeFront takes its range by ref and pops
off the code units that it decodes (unlike decode). It pretty much has
to do that, since it supports input ranges, and they can't do anything
else.
2013-03-03 19:25:01 -08:00
jmdavis
4f0c56f4d8 Added tests for reference type ranges to stride. 2013-03-03 19:25:01 -08:00
jmdavis
f1c1c2c7c5 Fix strideBack for ref ranges. 2013-03-03 19:25:00 -08:00
jmdavis
2735d30f4e Remove all uses of std.metastrings.Format. 2013-02-24 18:42:46 -08:00
Dmitry Olshansky
b7286e7444 generalize countLength 2012-12-13 20:41:20 +04:00
monarch dodra
dc74820e9e more typoes 2012-12-10 15:39:12 +01:00
monarch dodra
8539fcb6e0 typo and minor fixes 2012-12-10 14:33:45 +01:00
monarch dodra
be08e76437 strideBack(utf8) improvement
For bidir: Avoids poping past the front.
For RA: uses a static foreach.
2012-11-19 15:46:38 +01:00
monarch dodra
a354d33664 Removing unneeded check in UTF16 decode 2012-11-19 09:09:14 +01:00
monarch dodra
4919254e66 tweaks in doc and impl 2012-11-15 19:11:16 +01:00
Vladimir Panteleev
fde0998dea Fix various problems in DDoc, identified from compiler warnings. 2012-10-19 19:09:47 +03:00
jmdavis
3d92608c47 Added more deprecation messages. 2012-10-15 21:40:36 -07:00
jmdavis
038e30c737 Minor adjustment to better workaround bug# 8521.
Apparently, using the ternary operator makes it worse, so I switched it
to use if instead. The semantics are identical.
2012-08-22 02:26:21 -07:00
jmdavis
3ccbcbaff3 Made spacing of if consistent with string, strideBack, and decode. 2012-08-19 18:54:40 -07:00
jmdavis
a60025bb70 Changes for Andrei's comments on pull request# 743. 2012-08-18 14:03:59 -07:00
jmdavis
ad177d0cf1 Workaround for bug# 8521. 2012-08-08 12:43:56 -07:00
jmdavis
4ca0af8662 Made it so that decode works with arbitrary ranges of code units.
I also added decodeFront which operates on the first code point in the
range (unlike stride and strideBack, it requires a different name, since
the signatures of decode and decodeFront are almost identical - the only
difference being that decode takes the index by ref, and decodeFront
takes it as out).
2012-08-07 00:41:18 -07:00
jmdavis
b45e37139e Made it so that strideBack works with arbitrary ranges of code units.
I also added overloads for strideBack which don't require an index
(they operates on the last code point).
2012-08-07 00:38:11 -07:00
jmdavis
acc72035a0 Made it so that stride works with arbitrary ranges of code units.
I also added overloads for stride which don't require an index (they
operate on index 0).
2012-08-07 00:37:50 -07:00
k-hara
119f7f7424 Revert all const qualifier of class member functions that inherited from Object.
This change is necessary to avoid breaking existing codes which inherit them in user code.
2012-07-31 10:05:59 +09:00
Denis Shelomovskij
64f93b970a Replace typeof(<type>.init[0]) with templates
* ElementEncodingType (12)
* ElementType(1)
2012-07-11 12:58:40 -07:00
jmdavis
02931eb501 Revert "Merge pull request #664 from denis-sh/add-ArrayTarget-template"
This reverts commit f4d0a49493, reversing
changes made to 3cb69914c5.

The merging of request #664 was accidental, and it should not have been
merged. See https://github.com/D-Programming-Language/phobos/pull/664
for details.
2012-07-11 11:49:28 -07:00
dawg
5b7033aef2 make stride trusted
- no bounds check in release mode
2012-07-11 06:08:05 +02:00
dawg
6baf866a95 use faster pass by ref for l-values 2012-07-11 06:07:13 +02:00
Andrei Alexandrescu
408496e160 Merge pull request #680 from 9rnsr/strict_const
Add const attribute more strictly
2012-07-10 11:18:46 -07:00
k-hara
d6ffbd1328 Add const attribute more strictly 2012-07-11 01:02:59 +09:00
dawg
01e4ee175a bsr can always be provided by core.bitop 2012-07-10 10:25:22 +02:00
David Simcha
f4d0a49493 Merge pull request #664 from denis-sh/add-ArrayTarget-template
Add array target template
2012-07-08 13:08:27 -07:00
jmdavis
7514e0322a Fixed deprecations, since we had no release in June. 2012-07-06 22:15:53 -07:00
Denis Shelomovskij
ea6c9be477 Replace typeof(<type>.init[0]) with templates
* ElementEncodingType (12)
* ElementType(1)
2012-07-06 13:27:07 +04:00
jmdavis
d683d13e1c Added codeLength which works with a full string. 2012-06-30 22:39:13 -07:00
Brad Anderson
05b8ec7872 Use toUTFz's better description for toStringz
Also fix typo.
2012-06-13 11:46:18 -06:00