Lines Matching refs:replace
58 replace = strop.replace
59 self.assertTrue(replace("one!two!three!", '!', '@', 1)
61 self.assertTrue(replace("one!two!three!", '!', '@', 2)
63 self.assertTrue(replace("one!two!three!", '!', '@', 3)
65 self.assertTrue(replace("one!two!three!", '!', '@', 4)
68 # CAUTION: a replace count of 0 means infinity only to strop,
69 # not to the string .replace() method or to the
70 # string.replace() function.
72 self.assertTrue(replace("one!two!three!", '!', '@', 0)
74 self.assertTrue(replace("one!two!three!", '!', '@')
76 self.assertTrue(replace("one!two!three!", 'x', '@')
78 self.assertTrue(replace("one!two!three!", 'x', '@', 2)