mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 22:21:09 +03:00
Apply private and other function attributes to functions in std.uri
This commit is contained in:
parent
e81043f372
commit
385bd4d682
2 changed files with 5 additions and 4 deletions
|
@ -52,9 +52,9 @@ private enum
|
||||||
URI_Hash = 0x10, // '#'
|
URI_Hash = 0x10, // '#'
|
||||||
}
|
}
|
||||||
|
|
||||||
immutable char[16] hex2ascii = "0123456789ABCDEF";
|
private immutable char[16] hex2ascii = "0123456789ABCDEF";
|
||||||
|
|
||||||
immutable ubyte[128] uri_flags = // indexed by character
|
private immutable ubyte[128] uri_flags = // indexed by character
|
||||||
({
|
({
|
||||||
ubyte[128] uflags;
|
ubyte[128] uflags;
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ private string URI_Encode(dstring string, uint unescapedSet)
|
||||||
return R[0..Rlen].idup;
|
return R[0..Rlen].idup;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint ascii2hex(dchar c)
|
private uint ascii2hex(dchar c) @nogc @safe pure nothrow
|
||||||
{
|
{
|
||||||
return (c <= '9') ? c - '0' :
|
return (c <= '9') ? c - '0' :
|
||||||
(c <= 'F') ? c - 'A' + 10 :
|
(c <= 'F') ? c - 'A' + 10 :
|
||||||
|
|
|
@ -76,7 +76,8 @@ int main(string[] args)
|
||||||
sort(a); // qsort
|
sort(a); // qsort
|
||||||
Clock.currTime(); // datetime
|
Clock.currTime(); // datetime
|
||||||
cast(void)isValidDchar(cast(dchar)0); // utf
|
cast(void)isValidDchar(cast(dchar)0); // utf
|
||||||
std.uri.ascii2hex(0); // uri
|
string s1 = "http://www.digitalmars.com/~fred/fredsRX.html#foo end!";
|
||||||
|
assert(uriLength(s1) == 49);
|
||||||
std.zlib.adler32(0,null); // D.zlib
|
std.zlib.adler32(0,null); // D.zlib
|
||||||
auto t = task!cmp("foo", "bar"); // parallelism
|
auto t = task!cmp("foo", "bar"); // parallelism
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue