DMD 2.006 release

Lionello Lunesu lio at lunesu.remove.com
Wed Oct 17 04:55:05 PDT 2007


Bill Baxter wrote:
>     bool startsWith(string s, string sub) {
>         return (s.length>=sub.length && s[0..sub.length]==sub);
>     }
>     bool endsWith(string s, string sub) {
>         return (s.length>=sub.length && s[$-sub.length..$]==sub);
>     }

I think those would be useful for any type T. Array properties?

L.



More information about the Digitalmars-d-announce mailing list