Commit graph

313 commits

Author SHA1 Message Date
Vladiwostok
231ae8b68a
Fix D-Scanner linting issues (#9070)
* Fix UndocumentedDeclarationCheck linting issue

* Fix IfConstraintsIndentCheck linting issue

* Address feedback

* Fix publictests CI

* Fix old (libdparse) D-Scanner linting warn
2024-10-27 01:21:56 -07:00
Jeremy Baxter
f31a7bc41d replace dead links
for link in $(grep -Eor 'https?://[^\\)", ]+' | grep -v dlang.org \
| grep -Eo 'https?://.+'); do (printf "%s: " "$link"; curl -Is "$link" \
| head -n1) | grep -E '4..$'; done

for link in $(grep -Eor '\\$\\(HTTP .+, ' | grep -v dlang.org \
| cut -d' ' -f2- | sed 's/, .*$//'); do out="$(curl -Is "$link")"; \
(! [ $? = 0 ] || printf '%s' "$out" | head -n1 | grep -Eq '4..') \
&& printf '%s\\n' "$link"; done
2024-07-14 15:16:11 +12:00
0-v-0
42e2caa5c0 Improve code readablitity in unittests 2024-06-21 18:35:03 +02:00
Walter Bright
2759bc800a utf.d replace use of Unqual with cast() 2024-03-08 13:44:04 -08:00
Nathan Sashihara
68c7ec8d25 Fix recent isPointer changes to use is(T == U*, U) instead of is(T : U*, U)
The behaviors are different and the changes appear accidental rather
than deliberate. In at least one case the change would result in wrong
behavior:

https://github.com/dlang/phobos/pull/8635#issuecomment-1433898162

Affected PRs: #8635, #8636, #8637, #8638, #8639
2023-02-16 19:46:24 -05:00
Walter Bright
4706ae5dd1 remove isPointer use in std.utf 2022-11-30 23:12:57 -08:00
wolframw
9e42570bc2 std.utf.byCodeUnit: Fix typo in documentation 2022-08-30 14:36:40 +02:00
Luís Ferreira
96858b5dde
chore(utf): documentation of byUTF is wrong about thrown exceptions (#8464)
chore(utf): documentation of byUTF is wrong about thrown exceptions

Signed-off-by: Dennis <dkorpel@users.noreply.github.com>
Merged-on-behalf-of: Dennis <dkorpel@users.noreply.github.com>
2022-05-19 09:48:24 +00:00
aG0aep6G
3a97e4a9e9 fix issue 22867 - std.utf.decode changes offset despite error. 2022-03-10 13:08:21 +01:00
WebFreak001
dac59a4bde add isSomeFiniteCharInputRange as simplification
combines the very common constraint
`isInputRange!R && !isInfinite!R && isSomeChar!(ElementEncodingType!R)`
and adds a bunch of documentation with examples for users to understand
it better. This should lower the neccessary needed technical insight to
read basic docs, especially std.path and std.file docs.
2022-01-15 18:38:52 +01:00
dkorpel
0eb2fb7aaa Make phobos compile with pure-scope fix 2021-12-23 18:52:04 +01:00
Razvan Nitu
3d9dce5dbd
Merge pull request #8341 from WalterBright/scopeput
put scope on std.utf.encode() functions
2021-12-23 18:52:24 +02:00
Walter Bright
d23bd5be73 try putting scope on put() parameter 2021-12-23 01:10:56 -08:00
dkorpel
ea76f45494 Use return scope instead of just return 2021-11-26 17:03:06 +01:00
vladchicos
9ff8f339aa static if inside the save function 2021-08-03 16:34:59 +03:00
vladchicos
47e5c48f5e different save function for forward and bidirectional ranges 2021-08-03 15:39:58 +03:00
vladchicos
cd9fd4edb8 the description of what byUTF returns is more clear 2021-08-03 15:39:58 +03:00
vladchicos
5d7d9a1d9f early returns in back() functions 2021-08-03 15:39:58 +03:00
vladchicos
c76af82422 Fix Issue 16210 - std.utf.byUTF can be made into a bidirectional range. 2021-08-03 15:39:58 +03:00
berni44
b3e9f42da1 std.utf: Add isValidCodepoint. 2021-07-05 10:00:30 +00:00
aG0aep6G
d7bf7301be add scope to parameters of toUTF32 and toUTFImpl 2021-05-21 01:25:49 +02:00
nordlow
0db0187885 Annotate std/utf.d to please dlang/dmd#12520 2021-05-17 17:15:35 +02:00
Nathan Sashihara
3733c9d202 Fix Issue 21559 - Speed up walkLength for narrow strings 2021-01-19 10:49:21 -05:00
Nathan Sashihara
9351e91fe4 Reduce trait template instantiation in std.utf 2020-09-15 13:22:09 +02:00
Steven Schveighoffer
17ae8fc9be Make it so std.utf can be tested with no autodecoding. 2020-08-17 06:53:34 +02:00
Steven Schveighoffer
6065ce793c Fix 21131. Detect certain string appending situations and properly
handle them.
2020-08-07 13:03:26 +02:00
Nathan Sashihara
453faadf5b Replace is(Unqual!T == Unqual!U) with is(immutable T == immutable U) for speed & memory usage 2020-08-03 15:07:32 +02:00
Andrei Alexandrescu
05c79e1af1 unsignedToTempString: use the template version 2020-07-27 03:37:52 +02:00
Mathias LANG
b65799a8e7 Revert "EASY: Companion to https://github.com/dlang/druntime/pull/3167/" 2020-07-26 17:20:19 +02:00
Andrei Alexandrescu
587fd72ce6 Companion to https://github.com/dlang/druntime/pull/3167/ 2020-07-25 12:01:16 -04:00
Geod24
04f3979317 Replace 'Issue XXX' with Bugzilla links
Make the links clickable, as was done in the DMD repository.
Also avoids any ambiguity w.r.t. where the issue is stored.
2020-04-13 16:28:09 +09:00
Adam D. Ruppe
ae93f5317c Use consistent quickindex wrapper around hand-written list-of-links tables 2020-02-21 21:04:05 -05:00
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