      except (ValueError, TypeError):
          return u""
  
  def title(value):
      "Converts a string into titlecase"
      return re.sub("([a-z])'([A-Z])", lambda m: m.group(0).lower(), value.title())
  title = stringfilter(title)
  
  def truncatewords(value, arg):
      """
 
</s> remove     Truncates a string after a certain number of words
 </s> add     Truncates a string after a certain number of words. </s> remove     "Converts a string into all lowercase"
 </s> add     """Converts a string into all lowercase.""" </s> remove     "Converts a string into all uppercase"
 </s> add     """Converts a string into all uppercase.""" </s> remove     "Converts URLs in plain text into clickable links"
 </s> add     """Converts URLs in plain text into clickable links.""" </s> remove     Argument: Number of words to truncate after
 </s> add     Argument: Number of words to truncate after.
    """Converts a string into titlecase."""
      except (ValueError, TypeError):
          return u""
  
  def title(value):
    """Converts a string into titlecase."""
      return re.sub("([a-z])'([A-Z])", lambda m: m.group(0).lower(), value.title())
  title = stringfilter(title)
  
  def truncatewords(value, arg):
      """
keep keep keep keep replace keep keep keep keep keep
 Style and import fixes.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6641 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/template/defaultfilters.py