View source code
							
							
						
								Display the source code in std/format.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Struct std.format.FormatSpec
A General handler for printf style format specifiers. Used for building more
 specific formatting functions.
						
				struct FormatSpec(Char)
				
				  
				
				if (is(Unqual!Char == Char));
						
					
				Constructors
| Name | Description | 
|---|---|
| this | Construct a new FormatSpecusing the format stringfmt, no
       processing is done until needed. | 
Fields
| Name | Type | Description | 
|---|---|---|
| flDash | bool | The format specifier contained a '-'(printfcompatibility). | 
| flDash | bool | The format specifier contained a '-'(printfcompatibility). | 
| flHash | bool | The format specifier contained a '#'(printfcompatibility). | 
| flHash | bool | The format specifier contained a '#'(printfcompatibility). | 
| flPlus | bool | The format specifier contained a '+'(printfcompatibility). | 
| flPlus | bool | The format specifier contained a '+'(printfcompatibility). | 
| flSeparator | bool | The format specifier contained a ',' | 
| flSeparator | bool | The format specifier contained a ',' | 
| flSpace | bool | The format specifier contained a ' '(printfcompatibility). | 
| flSpace | bool | The format specifier contained a ' '(printfcompatibility). | 
| flZero | bool | The format specifier contained a '0'(printfcompatibility). | 
| flZero | bool | The format specifier contained a '0'(printfcompatibility). | 
| indexEnd | ubyte | Index of the last argument for positional parameter range, from 1toubyte. (0means not used). | 
| indexStart | ubyte | Index of the argument for positional parameters, from 1toubyte. (0means not used). | 
| nested | const(Char)[] | In case of a compound format specifier starting with        "%("and ending with"%)",nestedcontains the string contained within the two separators. | 
| precision | int | Precision. Its semantics depends on the argument type. For floating point numbers, precision dictates the number of decimals printed. | 
| sep | const(Char)[] | In case of a compound format specifier, _sepcontains the
       string positioning after"%|".sep is nullmeans no separator elsesepmeans 0 length
        separator. | 
| separatorChar | dchar | Character to insert between digits. | 
| separatorCharPos | int | Set to DYNAMICwhen the separator character is supplied at runtime. | 
| separators | int | Number of digits printed between separators. | 
| spec | char | The actual format specifier, 's'by default. | 
| trailing | const(Char)[] | _trailingcontains the rest of the format string. | 
| width | int | Minimum width, default 0. | 
Methods
| Name | Description | 
|---|---|
| toString | Gives a string containing all of the member variables on their own line. | 
Example
import stdAuthors
Walter Bright, Andrei Alexandrescu, and Kenji Hara
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.