从字符串中读取值
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