"Kagamin" <s...@here.lot> wrote in message news:ic9fjp$1no...@digitalmars.com... > See attachment. It's just a thought. Anyone want this in the language? > --- > string sval="ab128#d"; > int ival=274; > static assert("asdf \{sval} astt35 \{ival} zzf \{uuu} g,d" == > "asdf ab128#d astt35 274 zzf uuu g,d"); //(uuu not found) > --- >
Yes. Ruby has that to: var = 42 puts "The value of var plus 7 is #{var + 7}" Actually, that's pretty common in scripting languages. Although, I'd be happy at least with a a good string templating lib. Something like: auto str1 = "The value of $name$ is $val$".render( ["name":"myVar", "val":"17"] ); auto str2 = "Alternate delimiters are ::what::".render( ["what":"useful"], "::" ); That'd be more general anyway.