what mean of this code ?
i found it in template section, can anyone tell me what is it ?
1 2 3
|
if ((element>='a')&&(element<='z'))
element+='A'-'a';//----------what is this mean ?
return element;
|
'A' equals to the number 65 (ASCII-Code) and 'a' -> 97
so line 2 says element+=65-97;
-> element+=-32;
-> element-=32;
which effectively means 'a' turns to 'A', 'b' -> 'B'. In other words to upper case.
Topic archived. No new replies allowed.