Commit graph

281 commits

Author SHA1 Message Date
Alexandru Militaru
bb62aaca3d Replaced version (unittest) with version (StdUnittest) to avoid unnecessary overhead when compiling with -unittest 2020-01-19 14:05:17 +02:00
Petar Kirov
a46b46171c
Merge pull request #7248 from vporton/utf-forgotten-assert
Added forgotten assert keyword
2019-10-24 08:49:13 +03:00
Victor Porton
2a45742623 Added forgotten assert keyword 2019-10-23 22:33:18 +03:00
Walter Bright
585e5e478a std.utf.byUTF: add option to throw on invalid UTF 2019-08-18 11:06:28 -07:00
Walter Bright
232d9e616d UTFException should derive from UnicodeException 2019-08-15 23:42:35 -07:00
Sebastian Wilzbach
66991b4cd7 Use selective top-level module imports in std.{typecons,uni,utf} 2019-05-23 10:57:09 +02:00
Walter Bright
702c8f9695 byUTF: use copy constructor for save() 2019-03-13 02:10:03 -07:00
The Dlang Bot
b083f26a5f
Merge pull request #6900 from WalterBright/byUTF-dip1000
add copy constructor to byUTF()
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2019-03-13 08:59:12 +01:00
Walter Bright
55071b7236 byUTF: don't read from range in constructor 2019-03-12 21:08:49 -07:00
Walter Bright
448e5e2f3a add copy constructor to byUTF() 2019-03-12 16:34:15 -07:00
Bastiaan Veelo
9e57523134
toUTF16z cannot be used for LPWSTR.
Remove false statement from the documentation. Fixes issue 19151.
2019-02-22 15:52:07 +01:00
Nathan Sashihara
4cc47e6dc2 Fix Issue 19364 - Decrease template bloat for string functions
Use const(E)[] instead of E[] when it is valid and doesn't change the
return type.
2018-11-18 15:39:29 -05:00
Iain Buclaw
fd5facfe04 posix.mak: Enforce whitespace before opening parenthesis for version conditions 2018-09-22 16:57:24 +02:00
Walter Bright
33cceac7ac switch Digital Mars copyright to D Language Foundation 2018-09-05 13:49:46 -07:00
Basile Burg
db819575f1 Fix issue 11959 - Set private symbols declared in version(unittest) blocks 2018-08-26 10:22:11 +02:00
Sebastian Wilzbach
c324714fde Remove a few cases of underscore escaping 2018-06-04 13:05:01 +02:00
The Dlang Bot
e13e3889ac
Merge pull request #6435 from JackStouffer/input-range-link
Make references to input ranges a link to isInputRange
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2018-04-15 01:42:45 +02:00
Jack Stouffer
44dab62925 Added public examples to std.utf 2018-04-08 17:49:55 -04:00
Jack Stouffer
e14f89e170 Make references to input ranges a link to isInputRange 2018-04-08 16:19:57 -04:00
Sebastian Wilzbach
42894784dd Markdownify Phobos
$(D word) -> `word`
2018-04-02 22:32:47 +02:00
Jonathan M Davis
1436fca1cc Add website link to author name for Jonathan M Davis. 2018-03-10 16:31:23 -07:00
Nathan Sashihara
7faf4587f4 Minor optimization for byDchar for wchar[] / byWchar for dchar[] 2018-03-01 10:42:08 -05:00
Jack Stouffer
efc1f44aa2 Optimized byDchar 2018-02-27 09:33:11 -05:00
Jack Stouffer
663b5b9278 Revert addition of StdUnittest 2018-02-20 13:32:32 -05:00
Jack Stouffer
18cbb29b04 Replaced version(unittest) blocks with version(StdUnittest) 2018-02-01 19:56:59 -05:00
Sebastian Wilzbach
df6365092a Replace body keyword with its replacement: do
Automatic replacement with

    sed -i "s/^\([ ]*\)body/\1do/" -i **/*.d
2017-11-20 15:33:52 +01:00
Sebastian Wilzbach
97f6f39e4e Change AliasSeq(0, ...) uses of foreach to static foreach 2017-11-02 17:11:37 +01:00
Jonathan M Davis
eedc41ffbf Make spacing consistent. 2017-10-16 22:10:03 -06:00
Jonathan M Davis
6d7c2b0ba1 Fix Issue 17905: Add source property to byCodeUnit. 2017-10-16 22:10:03 -06:00
Jonathan M Davis
ae3a69023b Move some deprecations along. 2017-10-08 02:28:30 -06:00
Walter Bright
9493099242 std.utf - inure against integral promotion changes 2017-07-24 20:26:20 -07:00
Jack Stouffer
b2f88c3ea3 Removed old debug printfs 2017-07-08 23:05:49 -04:00
Vladimir Panteleev
d0b9555a06
Revert "Sort selective imports"
This reverts commit 998ad51fd7.
2017-06-13 17:51:52 +00:00
Sebastian Wilzbach
998ad51fd7 Sort selective imports 2017-06-12 08:12:09 +02:00
Sebastian Wilzbach
61717ecc7d Sort imports 2017-06-12 07:54:38 +02:00
Walter Bright
fc3ab2bcfd reimplement toUTF8/16 in terms of encode() 2017-05-20 16:26:36 -07:00
Vladimir Panteleev
86c43140fb
std.utf: Fix style (space around ..) 2017-03-11 02:53:33 +00:00
Vladimir Panteleev
05641deb9c
std.utf: Fix style (space after cast(x)) 2017-03-11 02:22:46 +00:00
Vladimir Panteleev
bc83bb2d82
std.utf: Fix missing import in documented unittest
Fixes CircleCI.
2017-03-11 02:15:07 +00:00
Jonathan M Davis
62e42df8f7 Update docs for byCodeUnit. 2017-03-08 12:54:31 -08:00
Jonathan M Davis
53e81a7500 Improve formatting consistency in byCodeUnit.
Also renames the member variable in ByCodeUnitImpl so that it doesn't
have the same name as the function parameter as well as making it more
clear that it's a string rather than a more general range type.
2017-03-08 12:54:31 -08:00
Jonathan M Davis
6e3d41cfe9 Fix issue 16642: byCodeUnit doesn't work properly with alias this.
If a template is going to allow implicit conversions, it really needs to
force the conversion in order to avoid subtle bugs. This fixes
byCodeUnit so that it forces the conversion to a string type for types
that convert implicitly. It also fixes it so that types which implicitly
convert to a string type but are also ranges of characters without the
conversion will not be converted by byCodeUnit.
2017-03-08 12:54:27 -08:00
Sebastian Wilzbach
1a26901f48 [BOOKTABLES]: Add BOOKTABLE to std.utf 2017-03-01 21:59:18 +01:00
Sebastian Wilzbach
b8a88558a9 Fix Ddoc warnings 2017-02-26 09:33:14 +01:00
Sebastian Wilzbach
a2c6398332 Automatically add spaces to binary operators (==)
command:

sed -E "s/([[:alnum:]]) == ([[:alnum:]])/\1 == \2/g" -i **/*.d
sed -E "s/([[:alnum:]])== ([[:alnum:]])/\1 == \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) ==([[:alnum:]])/\1 == \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Andrei Alexandrescu
30724e67d9 Merge pull request #5166 from wilzbach/dscanner-unittest-safe-or-system
Dscanner: let unittest be @safe or @system
2017-02-22 14:44:08 -05:00
Sebastian Wilzbach
a36cec8686 DScanner: automatially set all unattributed unittests to @safe or @system 2017-02-22 05:42:04 +01:00
Sebastian Wilzbach
425ab667a3 Automatically set the range style from a..b -> a .. b
Commands:

sed -E "s/([[:alnum:]])[.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]])[.][.] ([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) [.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
2017-02-22 05:37:31 +01:00
Sebastian Wilzbach
805c720595 Unify Phobos by ensuring there's always a space after cast(...)
Command:

sed -E 's/([^"])cast\(([^)]*?)\)([[:alnum:]])/\1cast(\2) \3/g' -i **/*.d
2017-02-21 16:40:20 +01:00
Sebastian Wilzbach
87dec58a41 DStyle: Constraints on declarations should have the same indentation level 2017-02-17 07:36:23 +01:00