mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 22:50:38 +03:00
Fix deprecations
This commit is contained in:
parent
16431f11c1
commit
16b9188b4a
3 changed files with 11 additions and 4 deletions
|
@ -637,7 +637,7 @@ if (isInputRange!Range && !isInfinite!Range &&
|
|||
assert(count("ababab", "abab") == 1);
|
||||
assert(count("ababab", "abx") == 0);
|
||||
// fuzzy count range in range
|
||||
assert(count!((a, b) => std.uni.toLower(a) == std.uni.toLower(b))("AbcAdFaBf", "ab") == 2);
|
||||
assert(count!((a, b) => toLower(a) == toLower(b))("AbcAdFaBf", "ab") == 2);
|
||||
// count predicate in range
|
||||
assert(count!("a > 1")(a) == 8);
|
||||
}
|
||||
|
|
|
@ -5288,6 +5288,7 @@ if (isSomeString!S)
|
|||
}
|
||||
|
||||
|
||||
deprecated
|
||||
@safe pure @nogc unittest
|
||||
{
|
||||
import std.conv : to;
|
||||
|
@ -5363,6 +5364,7 @@ if (isSomeString!S && isSomeString!S1)
|
|||
return count;
|
||||
}
|
||||
|
||||
deprecated
|
||||
@safe pure @nogc unittest
|
||||
{
|
||||
import std.conv : to;
|
||||
|
@ -5417,6 +5419,7 @@ if (isSomeString!S)
|
|||
return s;
|
||||
}
|
||||
|
||||
deprecated
|
||||
@safe pure unittest
|
||||
{
|
||||
import std.conv : to;
|
||||
|
@ -5433,6 +5436,7 @@ if (isSomeString!S)
|
|||
});
|
||||
}
|
||||
|
||||
deprecated
|
||||
@safe pure unittest
|
||||
{
|
||||
assert(removechars("abc", "x") == "abc");
|
||||
|
@ -5493,6 +5497,7 @@ S squeeze(S)(S s, in S pattern = null)
|
|||
return changed ? ((r is null) ? s[0 .. lasti] : cast(S) r) : s;
|
||||
}
|
||||
|
||||
deprecated
|
||||
@system pure unittest
|
||||
{
|
||||
import std.conv : to;
|
||||
|
@ -5549,6 +5554,7 @@ S1 munch(S1, S2)(ref S1 s, S2 pattern) @safe pure @nogc
|
|||
}
|
||||
|
||||
///
|
||||
deprecated
|
||||
@safe pure @nogc unittest
|
||||
{
|
||||
string s = "123abc";
|
||||
|
@ -5558,6 +5564,7 @@ S1 munch(S1, S2)(ref S1 s, S2 pattern) @safe pure @nogc
|
|||
assert(t == "" && s == "abc");
|
||||
}
|
||||
|
||||
deprecated
|
||||
@safe pure @nogc unittest
|
||||
{
|
||||
string s = "123€abc";
|
||||
|
|
|
@ -4762,9 +4762,9 @@ template Utf8Matcher()
|
|||
static auto encode(size_t sz)(dchar ch)
|
||||
if (sz > 1)
|
||||
{
|
||||
import std.utf : encode;
|
||||
import std.utf : encodeUTF = encode;
|
||||
char[4] buf;
|
||||
std.utf.encode(buf, ch);
|
||||
encodeUTF(buf, ch);
|
||||
char[sz] ret;
|
||||
buf[0] &= leadMask!sz;
|
||||
foreach (n; 1 .. sz)
|
||||
|
@ -7380,7 +7380,7 @@ package auto simpleCaseFoldings(dchar ch) @safe
|
|||
return len == 0;
|
||||
}
|
||||
|
||||
@property uint length() const
|
||||
@property size_t length() const
|
||||
{
|
||||
if (isSmall)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue