[DGD] case conversion

Robert Forshaw iouswuoibev at hotmail.com
Tue Jan 6 23:24:32 CET 2004




>From: Par Winzell <zell at skotos.net>

>DGD strings are copy-on-write...
>
>string lower_case(string str) {
>   int i;
>
>   for (i = 0; i < strlen(str); i ++) {
>     if (str[i] >= 'A' && str[i] <= 'Z') {
>       str[i] = (str[i] - 'A' + 'a');
>     }
>   }
>   return str;
>}


That works, thanks. :)

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! 
http://www.msn.co.uk/messenger

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list