View source code
							
							
						
								Display the source code in dmd/utils.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 dmd.utils.parseDigits
Convert string to integer.
						
				bool parseDigits(T)
				(
				
				  ref T val,
				
				  const(char)[] p,
				
				  const T max = T
				) pure nothrow @nogc @safe;
						
					
				Parameters
| Name | Description | 
|---|---|
| T | Type of integer to parse | 
| val | Variable to store the result in | 
| p | slice to start of string digits | 
| max | max allowable value (inclusive), defaults to T | 
Returns
false on error, true on success
Example
byte b;
ubyte ub;
short s;
ushort us;
int i;
uint ui;
long l;
ulong ul;
assert(bAuthors
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.