Thomas Kuehne wrote:
> | template FOUR_CHAR_CODE(char[] cmd){
> | static if(cmd.length != 4){
> | pragma(msg, "require 4 chars");
> | static assert(0);
> | }else{
> | const uint FOUR_CHAR_CODE = (cmd[0] << 24) | (cmd[1] << 16) | (cmd[2] << 8) | cmd[3];
> | }
> | }
Seems to do the trick. (returns 0x636d6473)
--anders