Capitalize the first alpha character in the reply and the
        first alpha character that follows one of [.?!] and a
        space.
558350
def join(self, words):
        """"""
        chars = list(u"".join(words))
        start = True

        for i in xrange(len(chars)):
            char = chars[i]
            if char.isalpha():
                if start:
                    chars[i] = char.upper()
                else:
                    chars[i] = char.lower()

                start = False
            else:
                if i > 2 and chars[i - 1] in ".?!" and char.isspace():
                    start = True

        return u"".join(chars)
1330937
def _build_abbreviation_regex(input_string):
        
        result=''
        for char in input_string:
            result += '[%s%s]?' % (char.upper(), char.lower())
        return '(%s)' % result
618238
public static String capitalize(String s)
    {
        if (s == null || s.length() == 0)
        {
            return s;
        }
        char chars[] = s.toCharArray();
        chars[0] = Character.toUpperCase(chars[0]);
        return new String(chars);
    }
1206206
def capitalize(text):
    
    text = nativestring(text)
    if EXPR_CAPITALS.match(text):
        return text
    return text.capitalize()
76881
public String capitalize(String string) {
		if (string == null || string.length() < 1) {
			return "";
		}
		return string.substring(0, 1).toUpperCase() + string.substring(1);
	}
1009449
public static String capitalizeWord( String s )
	{
		// validate
		if( (s == null) || (s.length() == 0) )
		{
			return s;
		}
		return s.substring(0, 1).toUpperCase() + s.substring(1).toLowerCase();
	}
1271383
def camelize(key):
    
    return ''.join(x.capitalize() if i > 0 else x
                   for i, x in enumerate(key.split('_')))
444863
function( str ) {
        return str
            // Replaces any - or _ characters with a space
            .replace( /[-_]+/g, ' ')
            // Removes any non alphanumeric characters
            .replace( /[^\w\s]/g, '')
            // Uppercases the first character in each group
            // immediately following a space (delimited by spaces)
            .replace( / (.)/g, function($1) { return $1.toUpperCase(); })
            // Removes spaces
            .replace( / /g, '' );
    }
413016
function sentenceCase(sentence, exciting = false) {

  // uppercase the first letter
  sentence = sentence[0].toUpperCase() + sentence.slice(1);

  if (['.', '!', '?'].indexOf(sentence.slice(-1)) > -1) {
    return sentence;
  } else if (exciting) {
    return sentence + "!";
  } else {
    return sentence + ".";
  }
}
976154
def tmpl_alpha(self, text):
        
        text = self.tmpl_asciify(text)
        text = re.sub(r'[^a-zA-Z]+', ' ', text)
        return re.sub(r'\s+', ' ', text)
616124
public static String capitalize(final String string)
   {
      if (string == null)
         throw new IllegalArgumentException("string");
      if (string.equals(""))
         throw new IllegalArgumentException("string");

      return Character.toUpperCase(string.charAt(0)) + string.substring(1);
   }
363196
function lowercaseFirstLetter(options) {
  const string = options.fn(this);
  return string.charAt(0).toLowerCase() + string.slice(1);
}
71996
function capitalize (text) {
  return text
    .replace (/^([^A-Za-z]*)([a-z])/, function (m, g1, g2) { return g1 + g2.toUpperCase() })
    .replace (/([\.\!\?]\s*)([a-z])/g, function (m, g1, g2) { return g1 + g2.toUpperCase() })
}
590585
def tokenize(text, lowercase=False, deacc=False):
    
    if lowercase:
        text = text.lower()
    if deacc:
        text = deaccent(text)
    for match in PAT_ALPHABETIC.finditer(text):
        yield match.group()
1182611
function capitalize(string) {
    return (/[a-z]/.test(string) ? string : string.toLowerCase())
        .replace(/[\s\-_]*([^\s\-_])([^\s\-_]+)/g, replacer)
        .replace(/[A-Z]/g, ' $&')
        .trim();
}
691218
public static String capitalize(String s) {
		if (s == null || isEmpty(s)) {
			return s;
		}
		return (new StringBuilder(s.length())).append(Character.toTitleCase(s.charAt(0))).append(s.substring(1)).toString();
	}
640248
function (name) {
		const leave_lower = ['of', 'the', 'from', 'de', 'le', 'la'];
		// need to find spaces in name and capitalize letter after space
		const parts = name.split(' ');
		const upper_parts = parts.map((w) => {
			return (leave_lower.indexOf(w) >= 0) ? w : `${r_helpers.capitalize(w)}`;
		});
		return upper_parts.join(' ');
	}