Just another example of missing string interpolation

Walter Bright newshound2 at digitalmars.com
Thu Oct 19 23:45:19 UTC 2023


On 10/19/2023 3:40 AM, Andrea Fontana wrote:
> // Example
> deleteFiles("/tmp/test.txt", "/tmp/old.txt");
> deleteFiles(i"/tmp/$dirname/$file"); <-- ooops this will be expanded?


It will be:

```
deleteFiles("/tmp/%s/%s", dirname, file);
```

And you'll probably get a message like:

"Could not find /tmp/%s/%s"




More information about the Digitalmars-d mailing list