Hi,

I am trying to count characters in a string like:

const string dna_chain = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC";
counts['A'] = countchars!(dna_chain, 'A');

But I get a compilation error:

template instance countchars!(dna_chain, "C") does not match template declaration countchars(S, S1)(S s, in S1 pattern) if (isSomeString!S && isSomeString!S1)

I cannot figure out why I do get the error. It completely eludes me. The documentation of countchars is minimal and it lacks examples.
Could someone enlighten me?

dmd version:
DMD64 D Compiler v2.071.1

Thanks

Reply via email to