從字串中讀取值
import std.format;
void main() {
string s = "Name Surname 18";
string name, surname;
int age;
formattedRead(s, "%s %s %s", &name, &surname, &age);
// %s selects a format based on the corresponding argument's type
}
有關格式字串的官方文件,請訪問: https : //dlang.org/phobos/std_format.html#std.format