It shouldn't be very hard to scan for the presence of certain character types: numerical, upper/lower case, and symbols.
If you are serious about password strength, you should consider detecting passwords that can be looked up in a dictionary or a list of names (any first or last name, username, places, companies, etc.), or real words/names modified by substitution of similar looking characters (for example, l:1, Z:2, E:3, A:4, S:5, ...), or simple patterns like 123ABC or qwerty. Those are just a few examples of weak passwords. Sorry, I couldn't tell you an algorithm.
Try putting "password strength" into your favorite search engine. Here's a particularly juicy hit: http://stackoverflow.com/questions/7...-of-a-password