Commit graph

579 commits

Author SHA1 Message Date
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
MoonlightSentinel
c961518ec6
Remove deprecated functions from std.string 2020-01-28 18:48:18 +01: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
Bernhard Seckinger
cc36941901 Make assumeUTF nothrow. 2020-01-02 18:18:13 +01:00
Atila Neves
236c2d3f93 Add scope preparing for in to become const scope 2019-10-30 17:06:13 +01:00
Nicholas Wilson
d0281b7da5
Merge pull request #7034 from burner/std.string_assert_messages
assert messages for std.string
2019-05-30 22:11:13 +08:00
Robert Schadek
f3244d58c1 assert messages for std.string
starting to work on dlang/phobos/project/2
2019-05-24 14:46:41 +01:00
Sebastian Wilzbach
1386fa253f Use selective top-level module imports in std.{stdio,string} 2019-05-23 10:32:49 +02:00
Rainer Schuetze
2e13c10025 add workaround for https://issues.dlang.org/show_bug.cgi?id=2396 to reduce compile time of unittests 2019-03-29 12:12:53 +01:00
Nicholas Wilson
10887d04f8
Merge pull request #6781 from CyberShadow/pull-20181123-213706
Fix Issue 19429 - indexOf("a", "b") should be nothrow/@nogc
2018-11-27 09:48:57 +08:00
Vladimir Panteleev
8889ef2f07
std.string: Optimize indexOf with start index a bit
Use of early returns improves readability and reduces the instruction
count in DMD's output.
2018-11-24 08:31:48 +00:00
Vladimir Panteleev
2f7854cc9a
std.string: Expose case-sensitive functions as separate overloads
Allow taking advantage of new nothrow/@nogc implementations from
nothrow/@nogc code.

Fixes issue 19429.
2018-11-23 22:44:06 +00:00
Vladimir Panteleev
f12e43e3b3
std.string: Optimize implementation for same-type case-sensitive search
Add a special case for case-sensitive search when the character size
of substrings matches. We do not need to decode in this case, so
perform a basic array search on the strings' representations.
2018-11-23 21:45:01 +00:00
Vladimir Panteleev
606465af0b
std.string: Refactor indexOf to a per-CaseSensitive template
Use the same code for case sensitive and insensitive search, but
refactor the case sensitivity parameter to a compile-time value under
the hood, so that each instantiation receives its own propagated
attributes.
2018-11-23 21:45:01 +00:00
The Dlang Bot
8cef7b563e
Merge pull request #6743 from n8sh/string-template-antibloat
Decrease template bloat for string functions
merged-on-behalf-of: Jonathan M Davis <jmdavis@users.noreply.github.com>
2018-11-19 04:57:44 +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
Nicholas Wilson
df938a337f
Merge pull request #6769 from n8sh/issue-19403
Fix Issue 19403 - Make std.string.stripLeft on char array nogc nothrow
2018-11-18 08:10:40 +08:00
Nathan Sashihara
63a2198003 Fix Issue 19403 - Make std.string.stripLeft on char array nogc nothrow 2018-11-17 15:02:16 -05:00
Nathan Sashihara
f22d322d0f Fix Issue 19405 - Speed up backwards UTF-8 decoding in stripRight & make nogc nothrow for strings 2018-11-16 03:14:23 -05:00
Nathan Sashihara
c380684bdb Fix Issue 19404 - Optimize std.string.stripRight 2018-11-15 21:12:01 -05:00
Nathan Sashihara
2e6c538dc6 Fix issue 19308 - optimize stripLeft
Add ASCII fast path to stripLeft & avoid redundant decoding.
2018-10-17 11:58:18 -04: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
Jonathan M Davis
ad109a2ccf Move some deprecations along. 2018-08-02 16:09:51 -06:00
Walter Bright
2954db64e0 string: add scope 2018-06-09 22:54:04 -07:00
Walter Bright
5c0946d322 add 'scope' to string.d 2018-06-08 12:09:55 -07:00
Sebastian Wilzbach
c324714fde Remove a few cases of underscore escaping 2018-06-04 13:05:01 +02:00
The Dlang Bot
e1cba41bd6
Merge pull request #6438 from GilesBathgate/fromWStringz
Add a wide fromStringz function.
merged-on-behalf-of: unknown
2018-05-29 15:56:41 +02:00
Radosław Rusiniak
590236b63d
Remove repeated word in std.string documentation 2018-05-26 22:44:30 +02:00
Giles Bathgate
96022302dc Remove inout on fromStringz template, remove old function 2018-05-02 17:38:18 +01:00
Giles Bathgate
20efd72da7 fix Issue 18813 add wchar/dchar fromStringz template function
This adds a wide string template functions to complement the existing fromStringz function.
2018-04-30 19:25:32 +01:00
Jack Stouffer
ba26a016e6 Added public examples to std.string 2018-04-11 11:17:05 -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
Jack Stouffer
663b5b9278 Revert addition of StdUnittest 2018-02-20 13:32:32 -05:00
Sebastian Wilzbach
d9830b739e Fix DScanner warnings 2018-02-10 22:46:32 +01:00
Jack Stouffer
18cbb29b04 Replaced version(unittest) blocks with version(StdUnittest) 2018-02-01 19:56:59 -05:00
Aravinda VK
2346990c09 Fix issue 13632: Enhancement to std.string.strip
Added second argument similar to Python `str.strip`

Second argument accepts a string of characters to strip and
strips only those characters.

Examples:

    "xyzhello".stripLeft("xyz") == "hello"
    "helloxy ".stripRight("xy ") == "hello"
    "xhellox".strip("x") == "hello"

Signed-off-by: Aravinda VK <mail@aravindavk.in>
2018-01-31 09:42:45 +05:30
Sebastian Wilzbach
f6dcb6d447
Merge pull request #5411 from jmdavis/string
Fix safety issues with splitLines, lineSplitter, and indexOf
2018-01-27 03:30:22 +01:00
Jonathan M Davis
8b051ff29f Fix safety of lineSplitter for implicitly convertible types. 2018-01-26 16:07:41 -07:00
Jonathan M Davis
9352e29921 Fix safety of splitLines for implicitly convertible types. 2018-01-26 16:07:41 -07:00
Jonathan M Davis
b5e0df8a26 Fix it so that std.string.indexOf does not use isConvertibleToString. 2018-01-26 16:07:41 -07:00
Sebastian Wilzbach
41d158f4c7 Add substitute for lazy replacements 2018-01-25 09:30:33 +01:00
Sebastian Wilzbach
a972e266ed Allow running all unittest with -transition=complex 2018-01-17 11:14:32 +01:00
The Dlang Bot
f3189822ab
Merge pull request #5989 from wilzbach/static-foreach
Use static foreach in Phobos
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2018-01-03 19:05:07 +01:00
Sebastian Wilzbach
7de3787876 Use static foreach in Phobos 2018-01-03 17:30:11 +01:00
Sebastian Wilzbach
9f492c1c2c @safeify more unittests 2018-01-03 05:44:04 +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
The Dlang Bot
416e0c76cd Merge pull request #5676 from RazvanN7/Unused_vars_part3
Get rid of unused variables part3
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2017-09-09 10:09:53 +02:00
RazvanN7
55120ef91a Get rid of unused variables 2017-08-22 11:00:14 +03:00