Perhaps it would have helped if you'd stated that you wanted to do it in LPC. Kavir gave you a solution in C, a completely different language. The solution in LPC would go something like this:
[code]
string alt_caps(string str) {
int i,j;
if (!str || str=="") return 0;
str=lower_case(str);
for(i=0,j=strlen(str);i<j;i+=2)
str[i..i]=capitalize(str[i..i]);
return str;
}
[/quote]
|