i have this code to check if string have j character
import std.stdio;
void main() {
const string name = "john";
for (int i = 0;i < name.length;i++) {
if (name[i] == "j") {
writeln("the name variable contain character j");
}
}
}
and then i get an error
Performing "debug" build using /Library/D/dmd/bin/dmd for x86_64.
learning ~master: building configuration "application"...
source/app.d(36,13): Error: incompatible types for `(name[cast(ulong)i]) == ("j")`: `immutable(char)` and `string`
/Library/D/dmd/bin/dmd failed with exit code 1.