def find( s, target, i=0 ):
    """Version fo find which returns len( s ) if target is not found"""
    result = s.find( target, i )
    if result == -1: result = len( s )
    return result
Version fo find which returns len( s ) if target is not found
recipes/Python/355531_Simple_patternbased_string/recipe-355531.py