ParamSet.readUnsigned

Converts str, which is expected to contain a decimal number, to the number it represents. Tailing and leading whitespace is allowed and will be trimmed. If src contains non-decimal digit characters after trimming, conversion will be stopped at the first non-decimal digit character.

class ParamSet
protected static
readUnsigned
(
T : ulong
)
(,
out T x
)

Parameters

src cstring

source string

x T

result output

Return Value

Type: cstring

slice of src starting with the first character that is not a decimal digit or an empty string if src contains only decimal digits

Examples

uint n;

cstring remaining = readUnsigned("  123abc45  ", n);

// n is now 123
// remaining is now "abc45"

Meta