xtd 0.2.0
Loading...
Searching...
No Matches

◆ to_string() [3/3]

string xtd::guid::to_string ( const string format,
const std::locale &  loc 
) const
overridevirtual

Returns a string representation of the value of this xtd::guid instance, according to the provided format specifier, and locale.

Parameters
formatA single format specifier that indicates how to format the value of this xtd::guid. The format parameter can be "N", "D", "B", "P", or "X". If format is null or an empty string (""), "D" is used.
locAn std::locale object that contains locale information (see std::locale).
Returns
The value of this xtd::guid, represented as a series of lowercase hexadecimal digits in the specified format.
Exceptions
xtd::format_exceptionThe value of format is not null, an empty string (""), "N", "D", "B", "P", or "X".
Remarks
The following table shows the accepted format specifiers for the format parameter. "0" represents a digit; hyphens ("-"), braces ("{", "}"), and parentheses ("(", ")") appear as shown.
Specifier Format of return value
N 32 digits:
00000000000000000000000000000000
D 32 digits separated by hyphens:
00000000-0000-0000-0000-000000000000
B 32 digits separated by hyphens, enclosed in braces:
{00000000-0000-0000-0000-000000000000}
P 32 digits separated by hyphens, enclosed in parentheses:
(00000000-0000-0000-0000-000000000000)
X Four hexadecimal values enclosed in braces, where the fourth value is a subset of eight hexadecimal values that is also enclosed in braces:
{0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}

Implements xtd::iformatable.