首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

土耳其文《d编程》range 通译 二

2012-12-18 
土耳其文《d编程》range 翻译 二As you can see, that output does not match what we have seen in the Cha

土耳其文《d编程》range 翻译 二
As you can see, that output does not match what we have seen in the Characters and Strings chapters. Since the elements of string and wstring are char and whar respectively, one might expect to see UTF code units in the previous output.

As a reminder, let's use the following function to see how different the use of strings as ranges is different from using them as arrays:

void printElements(T)(T str)
{
    for (int i = 0; i != str.length; ++i) {
        write(' ', str[i]);
    }

    writeln();
}

// ...

    printElements("abc?deé

热点排行