Commit graph

127 commits

Author SHA1 Message Date
gulugulubing
d2587823d0
fix std.encoding.sanitize usable in @safe.Fix #10545 (#10735) 2025-04-03 15:47:36 -07:00
Boris Carvajal
5dd42968e3 Rename the initial value of some enums from init to _init 2021-05-12 10:56:46 +08:00
Max Haughton
f04cbc612f
Issue 19446 - [std.encoding] BOM.utf7 is missing (#8051)
Issue 19446 - [std.encoding] BOM.utf7 is missing
merged-on-behalf-of: Max Haughton <maxhaton@users.noreply.github.com>
2021-05-08 02:14:02 +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
Adam D. Ruppe
ae93f5317c Use consistent quickindex wrapper around hand-written list-of-links tables 2020-02-21 21:04:05 -05:00
John Colvin
2f2914d7cb
typo in transcode unittest 2019-06-21 15:51:52 +01:00
Iain Buclaw
fd5facfe04 posix.mak: Enforce whitespace before opening parenthesis for version conditions 2018-09-22 16:57:24 +02:00
Sebastian Wilzbach
c324714fde Remove a few cases of underscore escaping 2018-06-04 13:05:01 +02:00
Steven Schveighoffer
6a324db900 Another batch for removing version(unittest) 2018-04-12 16:27:18 -04:00
Sebastian Wilzbach
42894784dd Markdownify Phobos
$(D word) -> `word`
2018-04-02 22:32:47 +02: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
7de3787876 Use static foreach in Phobos 2018-01-03 17:30:11 +01: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
Alexandr Belousov
abe7a84904 Add unittest 2017-08-15 15:10:58 +06:00
Alexandr Belousov
d7908aaf95 Added encoding Windows cp1251 2017-08-08 14:21:24 +06:00
Sebastian Wilzbach
61717ecc7d Sort imports 2017-06-12 07:54:38 +02:00
Andrei Alexandrescu
78b3328faa Get rid of static this for initializing encoding 2017-05-23 19:17:47 -04:00
Sebastian Wilzbach
2431287c83 [BOOKTABLES]: Add BOOKTABLE to std.encoding 2017-05-05 11:47:52 +02: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
Martin Nowak
9d73d18c0c fix Issue 16291 - EncodingScheme.create fails
- add EncodingScheme.register overload that references the registered class
- just adding the FQN name of a class does not reference that class, so
  it must not end up in the binary and subsequently EncodingScheme.create failed
- This used to work by chance b/c all the EncodingScheme implementations
  were in a module w/ static ctor. Any user of std.encoding did drag in
  that ModuleInfo, which in turn referenced all classes of std.encoding.
  Since moving the static ctor to std.internal.phobosinit to break a
  cycle, the classes were no longer referenced by a ModuleInfo w/ shared
  ctor, so they wouldn't end up in the binary unless explicitly
  referenced elsewhere.
- deprecate the old EncodingScheme.register(string fqn) b/c relying on
  Object.factory is slow, error prone (linkage), and really unnecessary
- import encodinginit in std.encoding so that the
  std_encoding_shared_static_this callback actually gets run
2016-10-05 01:54:22 +02:00
Andrei Alexandrescu
4889e48a90 Merge pull request #4599 from JackStouffer/format
Make std.encoding mostly @safe pure nothrow @nogc
2016-09-16 21:54:55 -04:00
anonymous
c3b6b42a98 fix selective import style 2016-08-09 02:04:47 +02:00
anonymous
d75ad32c89 remove pointless variable t 2016-08-09 00:06:03 +02:00
anonymous
bc250abbb8 let transcode accept mutable/const characters 2016-08-09 00:01:49 +02:00
Jack Stouffer
7134932984 Remove new templates 2016-07-22 14:22:14 -04:00
Jack Stouffer
7781d6c64a Added immutable to, and got rid of several variables in std.encoding 2016-07-19 15:35:23 -04:00
Jack Stouffer
2c928a2d54 Make std.encoding mostly @safe pure nothrow @nogc 2016-07-18 11:23:59 -04:00
David Nadlinger
c33f3862b7 Merge pull request #4493 from schveiguy/fixcycles2
Fix cycles in Phobos
2016-07-06 00:06:11 +01:00
Atila Neves
44c01ba36b Add @system and @safe to std.encoding unit tests 2016-07-04 17:23:47 +02:00
Robert burner Schadek
5e3aec9819 marked unittests and functions @safe pure nothrow in std.encoding
nogc

review

nogc
2016-06-30 17:07:00 +02:00
Steven Schveighoffer
df168487fc Fix cycles in Phobos 2016-06-28 15:00:01 -04:00
Sebastian Wilzbach
ec47ac4224 Remove the WEB macro in favor of HTTP
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02:00
anonymous
764caefa36 XREF -> REF (sed)
Done by:

(find . -type f -name "*.d" -print0; \
    find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r \
    's/\$\(XREF\s+([^(),]*),\s*([^(),]*)\)/$(REF \2, std,\1)/g'
2016-05-27 21:32:46 +02:00
Sebastian Wilzbach
18b8abf60a remove the deprecated wiki macros 2016-05-27 05:52:23 +02:00
Jack Stouffer
6b49b0a62f Fixed long lines in std/encoding.d 2016-05-10 20:51:39 -04:00
Robert burner Schadek
06d7676854 move typecons import to top of encoding
* followup to bom2
2016-05-02 22:25:55 +02:00
Robert burner Schadek
3d37aee77d Byte Order Mark (BOM) handling functions rewrite
* move to std.encoding
* less overengineering

https://github.com/D-Programming-Language/phobos/pull/3870 rework

Don't use top-level selective import in std.math because of DMD issue 314.

some quickfur comments

whitespace

remove used import

steven suggestion

utfBom

andrei nitpicks

andrei null
2016-05-02 20:39:37 +02:00
Sebastian Wilzbach
5a8988c149 style fix: add space after for operator 2016-04-27 02:04:02 +03:00
Sebastian Wilzbach
3d67cd228c style fix: space between operators 2016-04-26 22:26:20 +03:00
David Nadlinger
c8cc357691 Merge pull request #4183 from JackStouffer/encoding_fixup
Removed commented out, undocumented function
2016-04-11 15:23:49 +01:00
Jack Stouffer
84f69b5ea8 Removed commented out, undocumented function 2016-04-11 01:13:00 -04:00
Jack Stouffer
c80419ba06 Add informative example to canEncode 2016-04-11 00:28:44 -04:00
Benjamin L. Merritt
5f08c058ab Changed "Examples:" in Ddoc to "Example:" 2015-12-17 18:32:41 -08:00
Dragos Carp
d698887729 Remove obsolete TypeTuple references
Replace following names:
std.typetuple      -> std.meta
TypeTuple          -> AliasSeq
ParameterTypeTuple -> Parameters
FieldTypeTuple     -> Fields

std.traits requires more work than search/replace and is left unchanged.
2015-10-13 20:37:44 +02:00