Friday, January 8, 2010

Half glass full..


So, today I stumbled upon one quote -
Alcohol is not the solution to the problems of our times.....but neither is milk!

Nice one. I wanted to share this with my friends, but the problem was it was originally totally in upper case -
ALCOHOL IS NOT THE SOLUTION TO THE PROBLEMS OF OUR TIMES.....BUT NEITHER IS MILK!
 So I robotically (automatically you may say) opened firebug. wrapped the quote in quotes n called toLowerCase function.


"ALCOHOL IS ... ".toLowerCase().replace("al", "Al");


I wanna consider this as a good sign.. thinking everything *programatically*.
But at the same time it can be a bad sign.. thinking *everything* programatically.

:)

3 Comments:

Vedang said...

hehe... I would think this is more of a good thing than bad :D

Sunil Surana said...

You could have used
"ALCOHOL IS ... ".toLowerCase().replace("a", "A");

-Sunil Surana

Praj ~ said...

hehe.. actually yeah..
Spending time checking number of occurrence of 'a' is ridiculous :P