View source code
							
							
						
								Display the source code in std/stdio.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.
							
						Function std.stdio.File.readf
Reads formatted data from the file using std.
						
				uint readf(alias format, Data...)
				(
				
				  auto ref Data data
				
				)
				
				if (isSomeString!(typeof(format)));
				
				
				uint readf(Data...)
				(
				
				  scope const(char)[] format,
				
				  auto ref Data data
				
				);
						
					
				Parameters
| Name | Description | 
|---|---|
| format | The format string. When passed as a compile-time argument, the string will be statically checked against the argument types passed. | 
| data | Items to be read. | 
Returns
Same as formattedRead: The number of variables filled. If the input range r ends early,
      this number will be less than the number of variables provided.
Example
// test.d
void main()
{
    import std% echo "1 2 3" > input % rdmd test.d 2 3 4
Example
static import stdAuthors
Walter Bright, Andrei Alexandrescu, Alex Rønne Petersen
License
					Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.