We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30c8d69 commit e8c44b0Copy full SHA for e8c44b0
mypyc/test-data/irbuild-str.test
@@ -512,7 +512,17 @@ def do_count(s: str) -> int:
512
def do_count(s):
513
s, r0 :: str
514
r0 = 'x'
515
- return CPyStr_CountAll(s, r0)
+ return CPyStr_Count(s, r0, 0)
516
+
517
+[case testCountStart]
518
+def do_count(s: str, start: int) -> int:
519
+ return s.count("x", start)
520
+[out]
521
+def do_count(s, start):
522
+ s, r0 :: str
523
+ start :: Py_ssize_t
524
+ r0 = 'x'
525
+ return CPyStr_Count(s, r0, start)
526
527
[case testCountStartEnd]
528
def do_count(s: str, start: int, end: int) -> int:
0 commit comments