www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - how to write a wchar literal

reply "Frank Benoit (keinfarbton)" <benoit tionex.removethispart.de> writes:
is it possible to write an 'e' literal of type wchar?

func( wchar c);
func( dchar c);
func( char c);

...
func( cast(wchar) 'e' );

writing a cast sucks :)
Oct 23 2006
parent reply Hasan Aljudy <hasan.aljudy gmail.com> writes:
Frank Benoit (keinfarbton) wrote:
 is it possible to write an 'e' literal of type wchar?
 
 func( wchar c);
 func( dchar c);
 func( char c);
 
 ...
 func( cast(wchar) 'e' );
 
 writing a cast sucks :)
I think 'e'w should work. I know it works for stringa: "string"w is wchar[] (w suffix for wchar, d suffix for dchar, c suffix for char)
Oct 23 2006
parent BCS <BCS pathlink.com> writes:
Hasan Aljudy wrote:
 
 
 Frank Benoit (keinfarbton) wrote:
 
 is it possible to write an 'e' literal of type wchar?

 func( wchar c);
 func( dchar c);
 func( char c);

 ...
 func( cast(wchar) 'e' );

 writing a cast sucks :)
I think 'e'w should work. I know it works for stringa: "string"w is wchar[] (w suffix for wchar, d suffix for dchar, c suffix for char)
I don't think that works (I was dinking with it last night) however \u00C5 should work.
Oct 23 2006