twitter/twitter-text-java — pull request #35 by keitaf (2012-05-04 02:50:55+00:00)
Title: Add Validator class

This is adding Validator class with 2 methods, getTweetLength(), which counts the length of a tweet, and isValidTweet(), which checks is a tweet is valid or not.

getTweetLength() detects a URL in a tweet and counts its length as either 20 characters (if it's HTTP or protocol-less URL) or 21 characters (if it's HTTPS URLs).