mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 13:40:20 +03:00
Merge pull request #3768 from CyberShadow/pull-20151024-051829
HTML fixes
This commit is contained in:
commit
cf22992cbb
19 changed files with 269 additions and 267 deletions
|
@ -713,8 +713,8 @@ enum CURLOPTTYPE_FUNCTIONPOINT = 20000;
|
|||
|
||||
/// ditto
|
||||
enum CURLOPTTYPE_OFF_T = 30000;
|
||||
/** name is uppercase CURLOPT_<name>,
|
||||
type is one of the defined CURLOPTTYPE_<type>
|
||||
/** name is uppercase CURLOPT_$(LT)name$(GT),
|
||||
type is one of the defined CURLOPTTYPE_$(LT)type$(GT)
|
||||
number is unique identifier */
|
||||
|
||||
/** The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
|
||||
|
@ -1155,7 +1155,7 @@ enum CurlOption {
|
|||
opensocketdata = 10164, /// ditto
|
||||
/** POST volatile input fields. */
|
||||
copypostfields,
|
||||
/** set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
|
||||
/** set transfer mode (;type=$(LT)a|i$(GT)) when doing FTP via an HTTP proxy */
|
||||
proxy_transfer_mode = 166,
|
||||
/** Callback function for seeking in the input stream */
|
||||
seekfunction = 20167,
|
||||
|
|
|
@ -1858,7 +1858,7 @@ enum
|
|||
** Register a geometry callback named zGeom that can be used as part of an
|
||||
** R-Tree geometry query as follows:
|
||||
**
|
||||
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
|
||||
** SELECT ... FROM $(LT)rtree$(GT) WHERE $(LT)rtree col$(GT) MATCH $zGeom(... params ...)
|
||||
*/
|
||||
int sqlite3_rtree_geometry_callback(
|
||||
sqlite3 *db,
|
||||
|
|
|
@ -28047,9 +28047,9 @@ private:
|
|||
Note:
|
||||
Unless your system's local time zone deals with leap seconds (which is
|
||||
highly unlikely), then the only way to get a time zone which
|
||||
takes leap seconds into account is to use $(LREF PosixTimeZone) with a
|
||||
takes leap seconds into account is to use $(D PosixTimeZone) with a
|
||||
time zone whose name starts with "right/". Those time zone files do
|
||||
include leap seconds, and $(LREF PosixTimeZone) will take them into account
|
||||
include leap seconds, and $(D PosixTimeZone) will take them into account
|
||||
(though posix systems which use a "right/" time zone as their local time
|
||||
zone will $(I not) take leap seconds into account even though they're
|
||||
in the file).
|
||||
|
@ -28872,17 +28872,17 @@ version(StdDdoc)
|
|||
occur (especially for historical dates). Also, the TZ Database files
|
||||
include far more time zones than Windows does. So, for accurate
|
||||
time zone information, use the TZ Database files with
|
||||
$(LREF PosixTimeZone) rather than $(LREF WindowsTimeZone). However, because
|
||||
$(LREF WindowsTimeZone) uses Windows system calls to deal with the time,
|
||||
$(LREF PosixTimeZone) rather than $(D WindowsTimeZone). However, because
|
||||
$(D WindowsTimeZone) uses Windows system calls to deal with the time,
|
||||
it's far more likely to match the behavior of other Windows programs.
|
||||
Be aware of the differences when selecting a method.
|
||||
|
||||
$(LREF WindowsTimeZone) does not exist on Posix systems.
|
||||
$(D WindowsTimeZone) does not exist on Posix systems.
|
||||
|
||||
To get a $(LREF WindowsTimeZone), either call
|
||||
To get a $(D WindowsTimeZone), either call
|
||||
$(D WindowsTimeZone.getTimeZone) or call $(D TimeZone.getTimeZone)
|
||||
(which will give a $(LREF PosixTimeZone) on Posix systems and a
|
||||
$(LREF WindowsTimeZone) on Windows systems).
|
||||
$(D WindowsTimeZone) on Windows systems).
|
||||
|
||||
See_Also:
|
||||
$(WEB www.iana.org/time-zones, Home of the TZ Database files)
|
||||
|
|
|
@ -283,10 +283,10 @@ Macros:
|
|||
MYREF = $(LINK2 std_experimental_allocator_building_blocks_$2.html, $1)
|
||||
MYREF2 = $(LINK2 std_experimental_allocator_building_blocks_$2.html#$1, $1)
|
||||
MYREF3 = $(LINK2 std_experimental_allocator_$2.html#$1, $1)
|
||||
TDC = $(T td nowrap, $(D $1)$+)
|
||||
TDC2 = $(T td nowrap, $(D $(MYREF2 $1,$+))$(BR)$(SMALL
|
||||
TDC = $(TDNW $(D $1)$+)
|
||||
TDC2 = $(TDNW $(D $(MYREF2 $1,$+))$(BR)$(SMALL
|
||||
$(D std.experimental.allocator.building_blocks.$2)))
|
||||
TDC3 = $(T td nowrap, $(D $(MYREF3 $1,$+))$(BR)$(SMALL
|
||||
TDC3 = $(TDNW $(D $(MYREF3 $1,$+))$(BR)$(SMALL
|
||||
$(D std.experimental.allocator.$2)))
|
||||
RES = $(I result)
|
||||
POST = $(BR)$(SMALL $(I Post:) $(BLUE $(D $0)))
|
||||
|
|
282
std/format.d
282
std/format.d
|
@ -218,68 +218,68 @@ $(I FormatChar):
|
|||
$(TR $(TD $(B ' ')) $(TD numeric) $(TD Prefix positive
|
||||
numbers in a signed conversion with a space.)))
|
||||
|
||||
<dl>
|
||||
<dt>$(I Width)
|
||||
<dd>
|
||||
$(DL
|
||||
$(DT $(I Width))
|
||||
$(DD
|
||||
Specifies the minimum field width.
|
||||
If the width is a $(B *), an additional argument of type $(B int),
|
||||
preceding the actual argument, is taken as the width.
|
||||
If the width is negative, it is as if the $(B -) was given
|
||||
as a $(I Flags) character.
|
||||
as a $(I Flags) character.)
|
||||
|
||||
<dt>$(I Precision)
|
||||
<dd> Gives the precision for numeric conversions.
|
||||
$(DT $(I Precision))
|
||||
$(DD Gives the precision for numeric conversions.
|
||||
If the precision is a $(B *), an additional argument of type $(B int),
|
||||
preceding the actual argument, is taken as the precision.
|
||||
If it is negative, it is as if there was no $(I Precision) specifier.
|
||||
If it is negative, it is as if there was no $(I Precision) specifier.)
|
||||
|
||||
<dt>$(I FormatChar)
|
||||
<dd>
|
||||
<dl>
|
||||
<dt>$(B 's')
|
||||
<dd>The corresponding argument is formatted in a manner consistent
|
||||
$(DT $(I FormatChar))
|
||||
$(DD
|
||||
$(DL
|
||||
$(DT $(B 's'))
|
||||
$(DD The corresponding argument is formatted in a manner consistent
|
||||
with its type:
|
||||
<dl>
|
||||
<dt>$(B bool)
|
||||
<dd>The result is <tt>'true'</tt> or <tt>'false'</tt>.
|
||||
<dt>integral types
|
||||
<dd>The $(B %d) format is used.
|
||||
<dt>floating point types
|
||||
<dd>The $(B %g) format is used.
|
||||
<dt>string types
|
||||
<dd>The result is the string converted to UTF-8.
|
||||
$(DL
|
||||
$(DT $(B bool))
|
||||
$(DD The result is $(D "true") or $(D "false").)
|
||||
$(DT integral types)
|
||||
$(DD The $(B %d) format is used.)
|
||||
$(DT floating point types)
|
||||
$(DD The $(B %g) format is used.)
|
||||
$(DT string types)
|
||||
$(DD The result is the string converted to UTF-8.
|
||||
A $(I Precision) specifies the maximum number of characters
|
||||
to use in the result.
|
||||
<dt>structs
|
||||
<dd>If the struct defines a $(B toString()) method the result is
|
||||
to use in the result.)
|
||||
$(DT structs)
|
||||
$(DD If the struct defines a $(B toString()) method the result is
|
||||
the string returned from this function. Otherwise the result is
|
||||
StructName(field<sub>0</sub>, field<sub>1</sub>, ...) where
|
||||
field<sub>n</sub> is the nth element formatted with the default
|
||||
format.
|
||||
<dt>classes derived from $(B Object)
|
||||
<dd>The result is the string returned from the class instance's
|
||||
format.)
|
||||
$(DT classes derived from $(B Object))
|
||||
$(DD The result is the string returned from the class instance's
|
||||
$(B .toString()) method.
|
||||
A $(I Precision) specifies the maximum number of characters
|
||||
to use in the result.
|
||||
<dt>unions
|
||||
<dd>If the union defines a $(B toString()) method the result is
|
||||
to use in the result.)
|
||||
$(DT unions)
|
||||
$(DD If the union defines a $(B toString()) method the result is
|
||||
the string returned from this function. Otherwise the result is
|
||||
the name of the union, without its contents.
|
||||
<dt>non-string static and dynamic arrays
|
||||
<dd>The result is [s<sub>0</sub>, s<sub>1</sub>, ...]
|
||||
the name of the union, without its contents.)
|
||||
$(DT non-string static and dynamic arrays)
|
||||
$(DD The result is [s<sub>0</sub>, s<sub>1</sub>, ...]
|
||||
where s<sub>n</sub> is the nth element
|
||||
formatted with the default format.
|
||||
<dt>associative arrays
|
||||
<dd>The result is the equivalent of what the initializer
|
||||
formatted with the default format.)
|
||||
$(DT associative arrays)
|
||||
$(DD The result is the equivalent of what the initializer
|
||||
would look like for the contents of the associative array,
|
||||
e.g.: ["red" : 10, "blue" : 20].
|
||||
</dl>
|
||||
e.g.: ["red" : 10, "blue" : 20].)
|
||||
))
|
||||
|
||||
<dt>$(B 'c')
|
||||
<dd>The corresponding argument must be a character type.
|
||||
$(DT $(B 'c'))
|
||||
$(DD The corresponding argument must be a character type.)
|
||||
|
||||
<dt>$(B 'b','d','o','x','X')
|
||||
<dd> The corresponding argument must be an integral type
|
||||
$(DT $(B 'b','d','o','x','X'))
|
||||
$(DD The corresponding argument must be an integral type
|
||||
and is formatted as an integer. If the argument is a signed type
|
||||
and the $(I FormatChar) is $(B d) it is converted to
|
||||
a signed string of characters, otherwise it is treated as
|
||||
|
@ -291,26 +291,26 @@ $(I FormatChar):
|
|||
If there are fewer resulting digits than the $(I Precision),
|
||||
leading zeros are used as necessary.
|
||||
If the $(I Precision) is 0 and the number is 0, no digits
|
||||
result.
|
||||
result.)
|
||||
|
||||
<dt>$(B 'e','E')
|
||||
<dd> A floating point number is formatted as one digit before
|
||||
$(DT $(B 'e','E'))
|
||||
$(DD A floating point number is formatted as one digit before
|
||||
the decimal point, $(I Precision) digits after, the $(I FormatChar),
|
||||
±, followed by at least a two digit exponent:
|
||||
$(I d.dddddd)e$(I ±dd).
|
||||
If there is no $(I Precision), six
|
||||
digits are generated after the decimal point.
|
||||
If the $(I Precision) is 0, no decimal point is generated.
|
||||
If the $(I Precision) is 0, no decimal point is generated.)
|
||||
|
||||
<dt>$(B 'f','F')
|
||||
<dd> A floating point number is formatted in decimal notation.
|
||||
$(DT $(B 'f','F'))
|
||||
$(DD A floating point number is formatted in decimal notation.
|
||||
The $(I Precision) specifies the number of digits generated
|
||||
after the decimal point. It defaults to six. At least one digit
|
||||
is generated before the decimal point. If the $(I Precision)
|
||||
is zero, no decimal point is generated.
|
||||
is zero, no decimal point is generated.)
|
||||
|
||||
<dt>$(B 'g','G')
|
||||
<dd> A floating point number is formatted in either $(B e) or
|
||||
$(DT $(B 'g','G'))
|
||||
$(DD A floating point number is formatted in either $(B e) or
|
||||
$(B f) format for $(B g); $(B E) or $(B F) format for
|
||||
$(B G).
|
||||
The $(B f) format is used if the exponent for an $(B e) format
|
||||
|
@ -318,10 +318,10 @@ $(I FormatChar):
|
|||
The $(I Precision) specifies the number of significant
|
||||
digits, and defaults to six.
|
||||
Trailing zeros are elided after the decimal point, if the fractional
|
||||
part is zero then no decimal point is generated.
|
||||
part is zero then no decimal point is generated.)
|
||||
|
||||
<dt>$(B 'a','A')
|
||||
<dd> A floating point number is formatted in hexadecimal
|
||||
$(DT $(B 'a','A'))
|
||||
$(DD A floating point number is formatted in hexadecimal
|
||||
exponential notation 0x$(I h.hhhhhh)p$(I ±d).
|
||||
There is one hexadecimal digit before the decimal point, and as
|
||||
many after as specified by the $(I Precision).
|
||||
|
@ -333,9 +333,9 @@ $(I FormatChar):
|
|||
$(I h.hhhhhh)*2<sup>$(I ±d)</sup>.
|
||||
The exponent for zero is zero.
|
||||
The hexadecimal digits, x and p are in upper case if the
|
||||
$(I FormatChar) is upper case.
|
||||
</dl>
|
||||
</dl>
|
||||
$(I FormatChar) is upper case.)
|
||||
))
|
||||
)
|
||||
|
||||
Floating point NaN's are formatted as $(B nan) if the
|
||||
$(I FormatChar) is lower case, or $(B NAN) if upper.
|
||||
|
@ -376,10 +376,10 @@ $(I FormatChar):
|
|||
}
|
||||
-------------------------
|
||||
The output is:
|
||||
<pre class=console>
|
||||
$(CONSOLE
|
||||
My items are 1 2 3.
|
||||
My items are 1, 2, 3.
|
||||
</pre>
|
||||
)
|
||||
|
||||
The trailing end of the sub-format string following the specifier for each
|
||||
item is interpreted as the array delimiter, and is therefore omitted
|
||||
|
@ -395,9 +395,9 @@ My items are 1, 2, 3.
|
|||
}
|
||||
-------------------------
|
||||
which gives the output:
|
||||
<pre class=console>
|
||||
$(CONSOLE
|
||||
My items are -1-, -2-, -3-.
|
||||
</pre>
|
||||
)
|
||||
|
||||
These compound format specifiers may be nested in the case of a nested
|
||||
array argument:
|
||||
|
@ -419,7 +419,7 @@ My items are -1-, -2-, -3-.
|
|||
}
|
||||
-------------------------
|
||||
The output is:
|
||||
<pre class=console>
|
||||
$(CONSOLE
|
||||
1 2 3
|
||||
4 5 6
|
||||
7 8 9
|
||||
|
@ -431,7 +431,7 @@ My items are -1-, -2-, -3-.
|
|||
[[1 2 3]
|
||||
[4 5 6]
|
||||
[7 8 9]]
|
||||
</pre>
|
||||
)
|
||||
|
||||
Inside a compound format specifier, strings and characters are escaped
|
||||
automatically. To avoid this behavior, add $(B '-') flag to
|
||||
|
@ -447,11 +447,11 @@ My items are -1-, -2-, -3-.
|
|||
}
|
||||
-------------------------
|
||||
which gives the output:
|
||||
<pre class=console>
|
||||
$(CONSOLE
|
||||
My friends are ["John", "Nancy"].
|
||||
My friends are "John", "Nancy".
|
||||
My friends are John, Nancy.
|
||||
</pre>
|
||||
)
|
||||
*/
|
||||
uint formattedWrite(Writer, Char, A...)(Writer w, in Char[] fmt, A args)
|
||||
{
|
||||
|
@ -1254,10 +1254,10 @@ unittest
|
|||
import std.array : appender;
|
||||
auto a = appender!(string)();
|
||||
|
||||
auto f = FormatSpec!char("%-(%s%");
|
||||
auto f = FormatSpec!char("%-(%s%"); // %)")
|
||||
assertThrown(f.writeUpToNextSpec(a));
|
||||
|
||||
f = FormatSpec!char("%(%-");
|
||||
f = FormatSpec!char("%(%-"); // %)")
|
||||
assertThrown(f.writeUpToNextSpec(a));
|
||||
}
|
||||
|
||||
|
@ -5088,7 +5088,7 @@ private TypeInfo primitiveTypeInfo(Mangle m)
|
|||
* A $(I format specification) starts with a '%' character,
|
||||
* and has the following grammar:
|
||||
|
||||
<pre>
|
||||
$(CONSOLE
|
||||
$(I FormatSpecification):
|
||||
$(B '%%')
|
||||
$(B '%') $(I Flags) $(I Width) $(I Precision) $(I FormatChar)
|
||||
|
@ -5143,88 +5143,88 @@ $(I FormatChar):
|
|||
$(B 'G')
|
||||
$(B 'a')
|
||||
$(B 'A')
|
||||
</pre>
|
||||
<dl>
|
||||
<dt>$(I Flags)
|
||||
<dl>
|
||||
<dt>$(B '-')
|
||||
<dd>
|
||||
)
|
||||
$(DL
|
||||
$(DT $(I Flags))
|
||||
$(DL
|
||||
$(DT $(B '-'))
|
||||
$(DD
|
||||
Left justify the result in the field.
|
||||
It overrides any $(B 0) flag.
|
||||
It overrides any $(B 0) flag.)
|
||||
|
||||
<dt>$(B '+')
|
||||
<dd>Prefix positive numbers in a signed conversion with a $(B +).
|
||||
It overrides any $(I space) flag.
|
||||
$(DT $(B '+'))
|
||||
$(DD Prefix positive numbers in a signed conversion with a $(B +).
|
||||
It overrides any $(I space) flag.)
|
||||
|
||||
<dt>$(B '#')
|
||||
<dd>Use alternative formatting:
|
||||
<dl>
|
||||
<dt>For $(B 'o'):
|
||||
<dd> Add to precision as necessary so that the first digit
|
||||
$(DT $(B '#'))
|
||||
$(DD Use alternative formatting:
|
||||
$(DL
|
||||
$(DT For $(B 'o'):)
|
||||
$(DD Add to precision as necessary so that the first digit
|
||||
of the octal formatting is a '0', even if both the argument
|
||||
and the $(I Precision) are zero.
|
||||
<dt> For $(B 'x') ($(B 'X')):
|
||||
<dd> If non-zero, prefix result with $(B 0x) ($(B 0X)).
|
||||
<dt> For floating point formatting:
|
||||
<dd> Always insert the decimal point.
|
||||
<dt> For $(B 'g') ($(B 'G')):
|
||||
<dd> Do not elide trailing zeros.
|
||||
</dl>
|
||||
and the $(I Precision) are zero.)
|
||||
$(DT For $(B 'x') ($(B 'X')):)
|
||||
$(DD If non-zero, prefix result with $(B 0x) ($(B 0X)).)
|
||||
$(DT For floating point formatting:)
|
||||
$(DD Always insert the decimal point.)
|
||||
$(DT For $(B 'g') ($(B 'G')):)
|
||||
$(DD Do not elide trailing zeros.)
|
||||
))
|
||||
|
||||
<dt>$(B '0')
|
||||
<dd> For integer and floating point formatting when not nan or
|
||||
$(DT $(B '0'))
|
||||
$(DD For integer and floating point formatting when not nan or
|
||||
infinity, use leading zeros
|
||||
to pad rather than spaces.
|
||||
Ignore if there's a $(I Precision).
|
||||
Ignore if there's a $(I Precision).)
|
||||
|
||||
<dt>$(B ' ')
|
||||
<dd>Prefix positive numbers in a signed conversion with a space.
|
||||
</dl>
|
||||
$(DT $(B ' '))
|
||||
$(DD Prefix positive numbers in a signed conversion with a space.)
|
||||
)
|
||||
|
||||
<dt>$(I Width)
|
||||
<dd>
|
||||
$(DT $(I Width))
|
||||
$(DD
|
||||
Specifies the minimum field width.
|
||||
If the width is a $(B *), the next argument, which must be
|
||||
of type $(B int), is taken as the width.
|
||||
If the width is negative, it is as if the $(B -) was given
|
||||
as a $(I Flags) character.
|
||||
as a $(I Flags) character.)
|
||||
|
||||
<dt>$(I Precision)
|
||||
<dd> Gives the precision for numeric conversions.
|
||||
$(DT $(I Precision))
|
||||
$(DD Gives the precision for numeric conversions.
|
||||
If the precision is a $(B *), the next argument, which must be
|
||||
of type $(B int), is taken as the precision. If it is negative,
|
||||
it is as if there was no $(I Precision).
|
||||
it is as if there was no $(I Precision).)
|
||||
|
||||
<dt>$(I FormatChar)
|
||||
<dd>
|
||||
<dl>
|
||||
<dt>$(B 's')
|
||||
<dd>The corresponding argument is formatted in a manner consistent
|
||||
$(DT $(I FormatChar))
|
||||
$(DD
|
||||
$(DL
|
||||
$(DT $(B 's'))
|
||||
$(DD The corresponding argument is formatted in a manner consistent
|
||||
with its type:
|
||||
<dl>
|
||||
<dt>$(B bool)
|
||||
<dd>The result is <tt>'true'</tt> or <tt>'false'</tt>.
|
||||
<dt>integral types
|
||||
<dd>The $(B %d) format is used.
|
||||
<dt>floating point types
|
||||
<dd>The $(B %g) format is used.
|
||||
<dt>string types
|
||||
<dd>The result is the string converted to UTF-8.
|
||||
$(DL
|
||||
$(DT $(B bool))
|
||||
$(DD The result is <tt>'true'</tt> or <tt>'false'</tt>.)
|
||||
$(DT integral types)
|
||||
$(DD The $(B %d) format is used.)
|
||||
$(DT floating point types)
|
||||
$(DD The $(B %g) format is used.)
|
||||
$(DT string types)
|
||||
$(DD The result is the string converted to UTF-8.)
|
||||
A $(I Precision) specifies the maximum number of characters
|
||||
to use in the result.
|
||||
<dt>classes derived from $(B Object)
|
||||
<dd>The result is the string returned from the class instance's
|
||||
$(DT classes derived from $(B Object))
|
||||
$(DD The result is the string returned from the class instance's
|
||||
$(B .toString()) method.
|
||||
A $(I Precision) specifies the maximum number of characters
|
||||
to use in the result.
|
||||
<dt>non-string static and dynamic arrays
|
||||
<dd>The result is [s<sub>0</sub>, s<sub>1</sub>, ...]
|
||||
to use in the result.)
|
||||
$(DT non-string static and dynamic arrays)
|
||||
$(DD The result is [s<sub>0</sub>, s<sub>1</sub>, ...]
|
||||
where s<sub>k</sub> is the kth element
|
||||
formatted with the default format.
|
||||
</dl>
|
||||
formatted with the default format.)
|
||||
))
|
||||
|
||||
<dt>$(B 'b','d','o','x','X')
|
||||
<dd> The corresponding argument must be an integral type
|
||||
$(DT $(B 'b','d','o','x','X'))
|
||||
$(DD The corresponding argument must be an integral type
|
||||
and is formatted as an integer. If the argument is a signed type
|
||||
and the $(I FormatChar) is $(B d) it is converted to
|
||||
a signed string of characters, otherwise it is treated as
|
||||
|
@ -5236,25 +5236,25 @@ $(I FormatChar):
|
|||
If there are fewer resulting digits than the $(I Precision),
|
||||
leading zeros are used as necessary.
|
||||
If the $(I Precision) is 0 and the number is 0, no digits
|
||||
result.
|
||||
result.)
|
||||
|
||||
<dt>$(B 'e','E')
|
||||
<dd> A floating point number is formatted as one digit before
|
||||
$(DT $(B 'e','E'))
|
||||
$(DD A floating point number is formatted as one digit before
|
||||
the decimal point, $(I Precision) digits after, the $(I FormatChar),
|
||||
±, followed by at least a two digit exponent: $(I d.dddddd)e$(I ±dd).
|
||||
If there is no $(I Precision), six
|
||||
digits are generated after the decimal point.
|
||||
If the $(I Precision) is 0, no decimal point is generated.
|
||||
If the $(I Precision) is 0, no decimal point is generated.)
|
||||
|
||||
<dt>$(B 'f','F')
|
||||
<dd> A floating point number is formatted in decimal notation.
|
||||
$(DT $(B 'f','F'))
|
||||
$(DD A floating point number is formatted in decimal notation.
|
||||
The $(I Precision) specifies the number of digits generated
|
||||
after the decimal point. It defaults to six. At least one digit
|
||||
is generated before the decimal point. If the $(I Precision)
|
||||
is zero, no decimal point is generated.
|
||||
is zero, no decimal point is generated.)
|
||||
|
||||
<dt>$(B 'g','G')
|
||||
<dd> A floating point number is formatted in either $(B e) or
|
||||
$(DT $(B 'g','G'))
|
||||
$(DD A floating point number is formatted in either $(B e) or
|
||||
$(B f) format for $(B g); $(B E) or $(B F) format for
|
||||
$(B G).
|
||||
The $(B f) format is used if the exponent for an $(B e) format
|
||||
|
@ -5262,10 +5262,10 @@ $(I FormatChar):
|
|||
The $(I Precision) specifies the number of significant
|
||||
digits, and defaults to six.
|
||||
Trailing zeros are elided after the decimal point, if the fractional
|
||||
part is zero then no decimal point is generated.
|
||||
part is zero then no decimal point is generated.)
|
||||
|
||||
<dt>$(B 'a','A')
|
||||
<dd> A floating point number is formatted in hexadecimal
|
||||
$(DT $(B 'a','A'))
|
||||
$(DD A floating point number is formatted in hexadecimal
|
||||
exponential notation 0x$(I h.hhhhhh)p$(I ±d).
|
||||
There is one hexadecimal digit before the decimal point, and as
|
||||
many after as specified by the $(I Precision).
|
||||
|
@ -5277,15 +5277,15 @@ $(I FormatChar):
|
|||
$(I h.hhhhhh)*2<sup>$(I ±d)</sup>.
|
||||
The exponent for zero is zero.
|
||||
The hexadecimal digits, x and p are in upper case if the
|
||||
$(I FormatChar) is upper case.
|
||||
</dl>
|
||||
$(I FormatChar) is upper case.)
|
||||
)
|
||||
|
||||
Floating point NaN's are formatted as $(B nan) if the
|
||||
$(I FormatChar) is lower case, or $(B NAN) if upper.
|
||||
Floating point infinities are formatted as $(B inf) or
|
||||
$(B infinity) if the
|
||||
$(I FormatChar) is lower case, or $(B INF) or $(B INFINITY) if upper.
|
||||
</dl>
|
||||
))
|
||||
|
||||
Example:
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* POWER = $1<sup>$2</sup>
|
||||
* BIGSUM = $(BIG Σ <sup>$2</sup><sub>$(SMALL $1)</sub>)
|
||||
* CHOOSE = $(BIG () <sup>$(SMALL $1)</sup><sub>$(SMALL $2)</sub> $(BIG ))
|
||||
* TABLE_SV = <table border=1 cellpadding=4 cellspacing=0>
|
||||
* TABLE_SV = <table border="1" cellpadding="4" cellspacing="0">
|
||||
* <caption>Special Values</caption>
|
||||
* $0</table>
|
||||
* SVH = $(TR $(TH $1) $(TH $2))
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
*
|
||||
Macros:
|
||||
* TABLE_SV = <table border=1 cellpadding=4 cellspacing=0>
|
||||
* TABLE_SV = <table border="1" cellpadding="4" cellspacing="0">
|
||||
* <caption>Special Values</caption>
|
||||
* $0</table>
|
||||
* SVH = $(TR $(TH $1) $(TH $2))
|
||||
|
|
|
@ -80,7 +80,7 @@ $(TR $(TDNW Hardware Control) $(TD
|
|||
* Macros:
|
||||
* WIKI = Phobos/StdMath
|
||||
*
|
||||
* TABLE_SV = <table border=1 cellpadding=4 cellspacing=0>
|
||||
* TABLE_SV = <table border="1" cellpadding="4" cellspacing="0">
|
||||
* <caption>Special Values</caption>
|
||||
* $0</table>
|
||||
* SVH = $(TR $(TH $1) $(TH $2))
|
||||
|
@ -110,7 +110,7 @@ $(TR $(TDNW Hardware Control) $(TD
|
|||
* Copyright: Copyright Digital Mars 2000 - 2011.
|
||||
* D implementations of tan, atan, atan2, exp, expm1, exp2, log, log10, log1p,
|
||||
* log2, floor, ceil and lrint functions are based on the CEPHES math library,
|
||||
* which is Copyright (C) 2001 Stephen L. Moshier <steve@moshier.net>
|
||||
* which is Copyright (C) 2001 Stephen L. Moshier $(LT)steve@moshier.net$(GT)
|
||||
* and are incorporated herein by permission of the author. The author
|
||||
* reserves the right to distribute this material elsewhere under different
|
||||
* copying permissions. These modifications are distributed here under
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
* Macros:
|
||||
* WIKI = Phobos/StdMathSpecial
|
||||
*
|
||||
* TABLE_SV = <table border=1 cellpadding=4 cellspacing=0>
|
||||
* TABLE_SV = <table border="1" cellpadding="4" cellspacing="0">
|
||||
* <caption>Special Values</caption>
|
||||
* $0</table>
|
||||
* SVH = $(TR $(TH $1) $(TH $2))
|
||||
|
|
|
@ -3063,7 +3063,7 @@ struct HTTP
|
|||
}
|
||||
}
|
||||
|
||||
/** <a name="HTTP.Method"/ >The standard HTTP methods :
|
||||
/** <a name="HTTP.Method"/>The standard HTTP methods :
|
||||
* $(WEB www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.1, _RFC2616 Section 5.1.1)
|
||||
*/
|
||||
enum Method
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Validates an email address according to RFCs 5321, 5322 and others.
|
||||
*
|
||||
* Authors: Dominic Sayers <dominic@sayers.cc>, Jacob Carlborg
|
||||
* Authors: Dominic Sayers $(LT)dominic@sayers.cc$(GT), Jacob Carlborg
|
||||
* Copyright: Dominic Sayers, Jacob Carlborg 2008-.
|
||||
* Test schema documentation: Copyright © 2011, Daniel Marschall
|
||||
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
|
||||
|
|
|
@ -329,7 +329,7 @@ class OutBuffer
|
|||
* args = arguments to be formatted
|
||||
*
|
||||
* See_Also:
|
||||
* $(XREF stdio, writef);
|
||||
* $(XREF stdio, _writef);
|
||||
* $(XREF format, formattedWrite);
|
||||
*/
|
||||
void writef(Char, A...)(in Char[] fmt, A args)
|
||||
|
@ -355,7 +355,7 @@ class OutBuffer
|
|||
* args = arguments to be formatted
|
||||
*
|
||||
* See_Also:
|
||||
* $(XREF stdio, writefln);
|
||||
* $(XREF stdio, _writefln);
|
||||
* $(XREF format, formattedWrite);
|
||||
*/
|
||||
void writefln(Char, A...)(in Char[] fmt, A args)
|
||||
|
|
|
@ -32,7 +32,7 @@ distribution in various ways. So far the uniform distribution for
|
|||
integers and real numbers have been implemented.
|
||||
|
||||
Upgrading:
|
||||
$(WEB digitalmars.com/d/1.0/phobos/std_random.html#rand Phobos D1 $(D rand())) can
|
||||
$(WEB digitalmars.com/d/1.0/phobos/std_random.html#rand, Phobos D1 $(D rand())) can
|
||||
be replaced with $(D uniform!uint()).
|
||||
|
||||
Source: $(PHOBOSSRC std/_random.d)
|
||||
|
|
|
@ -11,7 +11,7 @@ files, incoming network data, etc.
|
|||
|
||||
For more detailed information about the conceptual aspect of ranges and the
|
||||
motivation behind them, see Andrei Alexandrescu's article
|
||||
$(LINK2 http://www.informit.com/articles/printerfriendly.aspx?p=1407357&rll=1,
|
||||
$(LINK2 http://www.informit.com/articles/printerfriendly.aspx?p=1407357$(AMP)rll=1,
|
||||
$(I On Iteration)).
|
||||
|
||||
Submodules:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
$(LUCKY Regular expressions) are a commonly used method of pattern matching
|
||||
on strings, with $(I regex) being a catchy word for a pattern in this domain
|
||||
specific language. Typical problems usually solved by regular expressions
|
||||
include validation of user input and the ubiquitous find & replace
|
||||
include validation of user input and the ubiquitous find $(AMP) replace
|
||||
in text processing utilities.
|
||||
|
||||
$(SECTION Synopsis)
|
||||
|
@ -117,21 +117,21 @@
|
|||
$(REG_ROW +?, Matches previous character/subexpression 1 or more times.
|
||||
Lazy version - stops as early as possible.)
|
||||
$(REG_ROW {n}, Matches previous character/subexpression exactly n times. )
|
||||
$(REG_ROW {n,}, Matches previous character/subexpression n times or more.
|
||||
$(REG_ROW {n$(COMMA)}, Matches previous character/subexpression n times or more.
|
||||
Greedy version - tries as many times as possible. )
|
||||
$(REG_ROW {n,}?, Matches previous character/subexpression n times or more.
|
||||
$(REG_ROW {n$(COMMA)}?, Matches previous character/subexpression n times or more.
|
||||
Lazy version - stops as early as possible.)
|
||||
$(REG_ROW {n,m}, Matches previous character/subexpression n to m times.
|
||||
$(REG_ROW {n$(COMMA)m}, Matches previous character/subexpression n to m times.
|
||||
Greedy version - tries as many times as possible, but no more than m times. )
|
||||
$(REG_ROW {n,m}?, Matches previous character/subexpression n to m times.
|
||||
$(REG_ROW {n$(COMMA)m}?, Matches previous character/subexpression n to m times.
|
||||
Lazy version - stops as early as possible, but no less then n times.)
|
||||
$(REG_TITLE Other, Subexpressions & alternations )
|
||||
$(REG_TITLE Other, Subexpressions $(AMP) alternations )
|
||||
$(REG_ROW (regex), Matches subexpression regex,
|
||||
saving matched portion of text for later retrieval. )
|
||||
$(REG_ROW (?:regex), Matches subexpression regex,
|
||||
$(U not) saving matched portion of text. Useful to speed up matching. )
|
||||
$(REG_ROW A|B, Matches subexpression A, or failing that, matches B. )
|
||||
$(REG_ROW (?P<name>regex), Matches named subexpression
|
||||
$(REG_ROW (?P$(LT)name$(GT)regex), Matches named subexpression
|
||||
regex labeling it with name 'name'.
|
||||
When referring to a matched portion of text,
|
||||
names work like aliases in addition to direct numbers.
|
||||
|
@ -164,8 +164,9 @@
|
|||
$(REG_TITLE Pattern element, Semantics )
|
||||
$(REG_ROW Any atom, Has the same meaning as outside of a character class.)
|
||||
$(REG_ROW a-z, Includes characters a, b, c, ..., z. )
|
||||
$(REG_ROW [a||b], [a--b], [a~~b], [a&&b], Where a, b are arbitrary classes,
|
||||
means union, set difference, symmetric set difference, and intersection respectively.
|
||||
$(REG_ROW [a||b]$(COMMA) [a--b]$(COMMA) [a~~b]$(COMMA) [a$(AMP)$(AMP)b],
|
||||
Where a, b are arbitrary classes, means union, set difference,
|
||||
symmetric set difference, and intersection respectively.
|
||||
$(I Any sequence of character class elements implicitly forms a union.) )
|
||||
)
|
||||
|
||||
|
@ -209,13 +210,13 @@
|
|||
The format string can reference parts of match using the following notation.
|
||||
$(REG_TABLE
|
||||
$(REG_TITLE Format specifier, Replaced by )
|
||||
$(REG_ROW $&, the whole match. )
|
||||
$(REG_ROW $$(AMP), the whole match. )
|
||||
$(REG_ROW $(DOLLAR)$(BACKTICK), part of input $(I preceding) the match. )
|
||||
$(REG_ROW $', part of input $(I following) the match. )
|
||||
$(REG_ROW $$, '$' character. )
|
||||
$(REG_ROW \c , where c is any character, the character c itself. )
|
||||
$(REG_ROW \c $(COMMA) where c is any character, the character c itself. )
|
||||
$(REG_ROW \\, '\' character. )
|
||||
$(REG_ROW $1 .. $99, submatch number 1 to 99 respectively. )
|
||||
$(REG_ROW $(DOLLAR)1 .. $(DOLLAR)99, submatch number 1 to 99 respectively. )
|
||||
)
|
||||
|
||||
$(SECTION Slicing and zero memory allocations orientation)
|
||||
|
@ -237,7 +238,7 @@
|
|||
API and utility constructs are modeled after the original $(D std.regex)
|
||||
by Walter Bright and Andrei Alexandrescu.
|
||||
|
||||
Source: $(PHOBOSSRC std/regex/_package.d)
|
||||
Source: $(PHOBOSSRC std/_regex/_package.d)
|
||||
|
||||
Macros:
|
||||
REG_ROW = $(TR $(TD $(I $1 )) $(TD $+) )
|
||||
|
|
169
std/stdint.d
169
std/stdint.d
|
@ -17,103 +17,104 @@
|
|||
|
||||
The aliases are:
|
||||
|
||||
<table border=1 cellspacing=0 cellpadding=5>
|
||||
<th>Exact Alias
|
||||
<th>Description
|
||||
<th>At Least Alias
|
||||
<th>Description
|
||||
<th>Fast Alias
|
||||
<th>Description
|
||||
<tr>
|
||||
<td>int8_t
|
||||
<td>exactly 8 bits signed
|
||||
<td>int_least8_t
|
||||
<td>at least 8 bits signed
|
||||
<td>int_fast8_t
|
||||
<td>fast 8 bits signed
|
||||
<tr>
|
||||
<td>uint8_t
|
||||
<td>exactly 8 bits unsigned
|
||||
<td>uint_least8_t
|
||||
<td>at least 8 bits unsigned
|
||||
<td>uint_fast8_t
|
||||
<td>fast 8 bits unsigned
|
||||
$(ATABLE $(TR
|
||||
$(TH Exact Alias)
|
||||
$(TH Description)
|
||||
$(TH At Least Alias)
|
||||
$(TH Description)
|
||||
$(TH Fast Alias)
|
||||
$(TH Description)
|
||||
)$(TR
|
||||
$(TD int8_t)
|
||||
$(TD exactly 8 bits signed)
|
||||
$(TD int_least8_t)
|
||||
$(TD at least 8 bits signed)
|
||||
$(TD int_fast8_t)
|
||||
$(TD fast 8 bits signed)
|
||||
)$(TR
|
||||
$(TD uint8_t)
|
||||
$(TD exactly 8 bits unsigned)
|
||||
$(TD uint_least8_t)
|
||||
$(TD at least 8 bits unsigned)
|
||||
$(TD uint_fast8_t)
|
||||
$(TD fast 8 bits unsigned)
|
||||
|
||||
<tr>
|
||||
<td>int16_t
|
||||
<td>exactly 16 bits signed
|
||||
<td>int_least16_t
|
||||
<td>at least 16 bits signed
|
||||
<td>int_fast16_t
|
||||
<td>fast 16 bits signed
|
||||
<tr>
|
||||
<td>uint16_t
|
||||
<td>exactly 16 bits unsigned
|
||||
<td>uint_least16_t
|
||||
<td>at least 16 bits unsigned
|
||||
<td>uint_fast16_t
|
||||
<td>fast 16 bits unsigned
|
||||
)$(TR
|
||||
$(TD int16_t)
|
||||
$(TD exactly 16 bits signed)
|
||||
$(TD int_least16_t)
|
||||
$(TD at least 16 bits signed)
|
||||
$(TD int_fast16_t)
|
||||
$(TD fast 16 bits signed)
|
||||
)$(TR
|
||||
$(TD uint16_t)
|
||||
$(TD exactly 16 bits unsigned)
|
||||
$(TD uint_least16_t)
|
||||
$(TD at least 16 bits unsigned)
|
||||
$(TD uint_fast16_t)
|
||||
$(TD fast 16 bits unsigned)
|
||||
|
||||
<tr>
|
||||
<td>int32_t
|
||||
<td>exactly 32 bits signed
|
||||
<td>int_least32_t
|
||||
<td>at least 32 bits signed
|
||||
<td>int_fast32_t
|
||||
<td>fast 32 bits signed
|
||||
<tr>
|
||||
<td>uint32_t
|
||||
<td>exactly 32 bits unsigned
|
||||
<td>uint_least32_t
|
||||
<td>at least 32 bits unsigned
|
||||
<td>uint_fast32_t
|
||||
<td>fast 32 bits unsigned
|
||||
)$(TR
|
||||
$(TD int32_t)
|
||||
$(TD exactly 32 bits signed)
|
||||
$(TD int_least32_t)
|
||||
$(TD at least 32 bits signed)
|
||||
$(TD int_fast32_t)
|
||||
$(TD fast 32 bits signed)
|
||||
)$(TR
|
||||
$(TD uint32_t)
|
||||
$(TD exactly 32 bits unsigned)
|
||||
$(TD uint_least32_t)
|
||||
$(TD at least 32 bits unsigned)
|
||||
$(TD uint_fast32_t)
|
||||
$(TD fast 32 bits unsigned)
|
||||
|
||||
<tr>
|
||||
<td>int64_t
|
||||
<td>exactly 64 bits signed
|
||||
<td>int_least64_t
|
||||
<td>at least 64 bits signed
|
||||
<td>int_fast64_t
|
||||
<td>fast 64 bits signed
|
||||
<tr>
|
||||
<td>uint64_t
|
||||
<td>exactly 64 bits unsigned
|
||||
<td>uint_least64_t
|
||||
<td>at least 64 bits unsigned
|
||||
<td>uint_fast64_t
|
||||
<td>fast 64 bits unsigned
|
||||
</table>
|
||||
)$(TR
|
||||
$(TD int64_t)
|
||||
$(TD exactly 64 bits signed)
|
||||
$(TD int_least64_t)
|
||||
$(TD at least 64 bits signed)
|
||||
$(TD int_fast64_t)
|
||||
$(TD fast 64 bits signed)
|
||||
)$(TR
|
||||
$(TD uint64_t)
|
||||
$(TD exactly 64 bits unsigned)
|
||||
$(TD uint_least64_t)
|
||||
$(TD at least 64 bits unsigned)
|
||||
$(TD uint_fast64_t)
|
||||
$(TD fast 64 bits unsigned)
|
||||
))
|
||||
|
||||
The ptr aliases are integral types guaranteed to be large enough
|
||||
to hold a pointer without losing bits:
|
||||
|
||||
<table border=1 cellspacing=0 cellpadding=5>
|
||||
<th>Alias
|
||||
<th>Description
|
||||
<tr>
|
||||
<td>intptr_t
|
||||
<td>signed integral type large enough to hold a pointer
|
||||
<tr>
|
||||
<td>uintptr_t
|
||||
<td>unsigned integral type large enough to hold a pointer
|
||||
</table>
|
||||
$(ATABLE $(TR
|
||||
$(TH Alias)
|
||||
$(TH Description)
|
||||
)$(TR
|
||||
$(TD intptr_t)
|
||||
$(TD signed integral type large enough to hold a pointer)
|
||||
)$(TR
|
||||
$(TD uintptr_t)
|
||||
$(TD unsigned integral type large enough to hold a pointer)
|
||||
))
|
||||
|
||||
The max aliases are the largest integral types:
|
||||
|
||||
<table border=1 cellspacing=0 cellpadding=5>
|
||||
<th>Alias
|
||||
<th>Description
|
||||
<tr>
|
||||
<td>intmax_t
|
||||
<td>the largest signed integral type
|
||||
<tr>
|
||||
<td>uintmax_t
|
||||
<td>the largest unsigned integral type
|
||||
</table>
|
||||
$(ATABLE $(TR
|
||||
$(TH Alias)
|
||||
$(TH Description)
|
||||
)$(TR
|
||||
$(TD intmax_t)
|
||||
$(TD the largest signed integral type)
|
||||
)$(TR
|
||||
$(TD uintmax_t)
|
||||
$(TD the largest unsigned integral type)
|
||||
))
|
||||
|
||||
* Macros:
|
||||
* WIKI=Phobos/StdStdint
|
||||
* ATABLE=<table border="1" cellspacing="0" cellpadding="5">$0</table>
|
||||
*
|
||||
* Copyright: Copyright Digital Mars 2000 - 2009.
|
||||
* License: $(WEB www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
|
||||
|
|
|
@ -330,12 +330,12 @@ void main(string[] args)
|
|||
// underlying $(D FILE*) is closed.
|
||||
}
|
||||
----
|
||||
<pre class=console>
|
||||
$(CONSOLE
|
||||
% rdmd test.d Jimmy
|
||||
% cat test.txt
|
||||
Hello, Jimmy!
|
||||
% __
|
||||
</pre>
|
||||
)
|
||||
*/
|
||||
struct File
|
||||
{
|
||||
|
|
|
@ -2207,7 +2207,7 @@ unittest
|
|||
}
|
||||
|
||||
/**
|
||||
* Alternate name for $(LREF FieldTypeTuple), kept for legacy compatibility.
|
||||
* Alternate name for $(LREF Fields), kept for legacy compatibility.
|
||||
*/
|
||||
alias FieldTypeTuple = Fields;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Written in the D programming language.
|
||||
|
||||
/**
|
||||
* Compress/decompress data using the $(WEB www.zlib.net, zlib library).
|
||||
* Compress/decompress data using the $(WEB www._zlib.net, _zlib library).
|
||||
*
|
||||
* References:
|
||||
* $(WEB en.wikipedia.org/wiki/Zlib, Wikipedia)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue