import re


def titlecase(s):
    """ Returns the string `s` converted to titlecase. """
    return re.sub(
        r"[A-Za-z]+('[A-Za-z]+)?",
        lambda m: m.group(0)[0].upper() + m.group(0)[1:],
        s
    )