
    Design a function that determines the total number of distinct text fragments that can be extracted from a social media post, where each fragment (non-empty substring) will be checked against the content moderation database. The function should process the input post text and return the count of all possible continuous text segments that could contain potentially harmful content, ensuring no possible harmful phrase combination is missed during moderation.
    

    
def number_of_substrings(str):
    """
    Design a function that determines the total number of distinct text fragments that can be extracted from a social media post, where each fragment (non-empty substring) will be checked against the content moderation database. The function should process the input post text and return the count of all possible continuous text segments that could contain potentially harmful content, ensuring no possible harmful phrase combination is missed during moderation.
    

    """
def number_of_substrings(str):
    """
    Design a function that determines the total number of distinct text fragments that can be extracted from a social media post, where each fragment (non-empty substring) will be checked against the content moderation database. The function should process the input post text and return the count of all possible continuous text segments that could contain potentially harmful content, ensuring no possible harmful phrase combination is missed during moderation.
    

    """
    str_len = len(str)
    return int(str_len * (str_len + 1) / 2)