def stripEndClauses(content, clauses):
    clauseIndex = 0
    index = 0
    for item in clauses:
        index = content.lower().find(item.lower())
        if ((index > (- 1)) and ((index < clauseIndex) or (clauseIndex == 0))):
            clauseIndex = index
    if (clauseIndex > 0):
        return content[:clauseIndex]
    else:
        return content
def stripEndClauses(content, clauses):
    clauseIndex = 0
    index = 0
    for item in clauses:
        index = content.lower().find(item.lower())
        if ((index > (- 1)) and ((index < clauseIndex) or (clauseIndex == 0))):
            clauseIndex = index
    if (clauseIndex > 0):
        return content[:clauseIndex]
    else:
        return content