Capitalize first letter for each part of the name.

    Example::

        person_name = "James Bond"

    **中文文档**

    将文本修改为人名格式。每个单词的第一个字母大写。

def format_person_name(text):
    """Capitalize first letter for each part of the name.

    Example::

        person_name = "James Bond"

    **中文文档**

    将文本修改为人名格式。每个单词的第一个字母大写。
    """
    text = text.strip()
    if len(text) == 0:  # if empty string, return it
        return text
    else:
        text = text.lower()  # lower all char
        # delete redundant empty space
        words = [word for word in text.strip().split(" ") if len(word) >= 1]
        words = [word[0].upper() + word[1:] for word in words]
        return " ".join(words)