<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.1.92">
</HEAD>
<BODY>
dchar works but simple solution doesn't.<BR>
<BR>
code:<BR>
<BR>
char[] chars = "òà";<BR>
chars.canFind('à');<BR>
<BR>
It says:<BR>
<BR>
Error: cannot implicitly convert expression ("\xc3\xb2\xc3\xa0") of type string to char[]<BR>
Error: template std.algorithm.canFind(alias pred = "a == b",Range,V) if (is(typeof(find!(pred)(range,value)))) does not match any function template declaration<BR>
Error: template std.algorithm.canFind(alias pred = "a == b",Range,V) if (is(typeof(find!(pred)(range,value)))) cannot deduce template function from argument types !()(char[],wchar)<BR>
<BR>
Il giorno mar, 22/11/2011 alle 08.49 -0800, Jonathan M Davis ha scritto:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Tuesday, November 22, 2011 17:38:36 Andrea Fontana wrote:
> I guess I should use wchar instead of char. :)

Individual characters really should be processed as dchars in the general 
case. There's a simple solution here though:

char[] chars = "àèì";

- Jonathan M Davis
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>