Sha256: dda8f23984ba14ad18dfd1a8b662593caa6e6335c042ca6e80c807d2ff3bb2e6
Contents?: true
Size: 392 Bytes
Versions: 32
Compression:
Stored size: 392 Bytes
Contents
class String def char_length self.split(//u).size end def char_length_with_t_co Tw::Conf.update_twitter_config len = self.char_length self.scan(Regexp.new "https?://[^\s]+").each do |url| len += (url =~ /^https/ ? Tw::Conf['twitter_config']['short_url_length_https'] : Tw::Conf['twitter_config']['short_url_length']) - url.char_length end len end end
Version data entries
32 entries across 32 versions & 1 rubygems