Commit graph

154 commits

Author SHA1 Message Date
Ilya Yaroshenko
2c744b54e1 std.range: constraints => primitives
See discussion and voting in #2661
2014-11-23 20:05:20 +03:00
Ilya Yaroshenko
a64a6fafdb std.utf: clean imports 2014-11-14 17:55:21 +03:00
Martin Nowak
dc7eb9dbd9 Merge pull request #2682 from aG0aep6G/stride
std.utf.stride: reject sequence lengths greater than 4
2014-11-12 01:21:11 +01:00
anonymous
5025e47790 back to old "Notes:" 2014-11-11 19:37:03 +01:00
anonymous
b051c0e278 back to old "Throws:" 2014-11-11 16:14:09 +01:00
anonymous
7ed4999515 link to RFC 3629 2014-11-10 23:49:53 +01:00
anonymous
bdecb4cbce reject sequence lengths greater than 4 2014-11-10 22:57:50 +01:00
Dmitry Olshansky
77b4b8ac22 Merge pull request #2656 from quickfur/issue13689
[trivial] Issue 13689: byCodeUnit fails to be a random access range.
2014-11-10 23:22:59 +03:00
Ilya Yaroshenko
7db4e595ba std.utf: clean imports 2014-11-09 12:29:55 +03:00
H. S. Teoh
8898fe5571 Issue 13689: byCodeUnit fails to be a random access range.
Add static assert to ensure random accessability.
2014-11-05 06:53:10 -08:00
Dmitry Olshansky
335228cb07 Merge pull request #2566 from MartinNowak/workaround7625
workaround inline Issue 7625
2014-09-29 12:29:00 +04:00
Martin Nowak
fea9bad209 workaround inline Issue 7625
- add explicit else branches so that dmd can inline those functions
2014-09-29 04:25:48 +02:00
sinkuu
2395beab6f Fix issue 13535 byCodeUnit doesn't satisfy hasSlicing 2014-09-27 12:34:18 +09:00
sinkuu
8af7d9a4ed Make byCodeUnit bidirectional range 2014-09-21 12:05:29 +09:00
sinkuu
a131306bdf Fix indent 2014-09-21 10:25:16 +09:00
Marc Schütz
61921f6503 Remove pure nothrow @nogc from input range version of byXchar
The functions are templated and get their attributes deduced.
2014-09-04 10:04:46 +02:00
Denis Shelomovskij
d63035003a Fix some property enforcements. 2014-09-01 18:01:16 +04:00
monarchdodra
5facb72b21 Tweak enum table 2014-08-26 09:33:57 +02:00
Dmitry Olshansky
9afbbaf056 Fix issue 12923
UTF exception in stride even though passes validate.
The root cause is that decode has very lax checking of the first
code unit.
2014-07-27 17:28:51 +04:00
Denis Shelomovskij
28460a4274 Add @nogc attributes to std.utf.
Also remove GC allocation from `byDchar.front` as it caused all `by*` ranges be not-`@nogc`.
2014-07-13 15:17:51 +04:00
k-hara
3c45d63064 fix property enforcement 2014-06-21 18:44:14 +09:00
k-hara
5b39ab253c Make side effect on strongly pure function call 2014-06-14 23:17:44 +09:00
monarch dodra
5319539b97 Merge pull request #2043 from WalterBright/byChar
add byCodeunit, byChar, byWchar and byDchar to std.utf
2014-06-07 15:26:14 +02:00
Walter Bright
0cfc022bfc add byCodeunit, byChar, byWchar and byDchar to std.utf 2014-06-05 18:19:21 -07:00
k-hara
0a41eb29e0 Supplemental fix for issue 12857
The local template function zeroLen is inferred to @system. So it should not be placed directly under the @safe unittest body.
2014-06-05 12:54:16 +09:00
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