mercurial/strutil.py
branchstable
changeset 10263 25e572394f5c
parent 8225 46293a0c7e9f
child 25979 b723f05ec49b
equal deleted inserted replaced
10262:eb243551cbd8 10263:25e572394f5c
     1 # strutil.py - string utilities for Mercurial
     1 # strutil.py - string utilities for Mercurial
     2 #
     2 #
     3 # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com>
     3 # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com>
     4 #
     4 #
     5 # This software may be used and distributed according to the terms of the
     5 # This software may be used and distributed according to the terms of the
     6 # GNU General Public License version 2, incorporated herein by reference.
     6 # GNU General Public License version 2 or any later version.
     7 
     7 
     8 def findall(haystack, needle, start=0, end=None):
     8 def findall(haystack, needle, start=0, end=None):
     9     if end is None:
     9     if end is None:
    10         end = len(haystack)
    10         end = len(haystack)
    11     if end < 0:
    11     if end < 0: