A new class -->String

Dan murpsoft at hotmail.com
Thu Apr 5 12:17:19 PDT 2007


I totally disagree with Class'ing a simple data type just to introduce functions to handle it.

Especially since you can use that pretty OO notation on arrays simply by having the functions accept the array as the first argument.  This works:

void slice(inout char[] s, size_t start, size_t finish){
...
}

char[] myS = "Hello!  How are you?";

myS.slice(2,6);




More information about the Digitalmars-d mailing list