constness for arrays
Andrew Fedoniouk
news at terrainformatica.com
Tue Jul 18 20:27:26 PDT 2006
>
> What do you mean by external methods?
>
> This?
Positive.
>
> import std.stdio;
> void main()
> {
> char[] str = "abc";
> writefln(str.ucase()); // "ABC"
> }
> char[] ucase(char[] str)
> {
> foreach(inout char c; str) if(c >= 'a' && c <= 'z') c += 'A' - 'a';
> return str;
> }
>
> If so, that's not a bug, it's intentional. Line 4141 of expression.c.
>
People are looking in the doc/ language specification first.
Line 4141 of expression.c is the last place where someone will
try to find answer on what language features D has.
Andrew Fedoniouk.
http://terrainformatica.com
More information about the Digitalmars-d
mailing list