Return the length of str, considering only characters below max.
(str, max)
| 20 | return base.take_bytes(), extended |
| 21 | |
| 22 | def selective_len(str, max): |
| 23 | """Return the length of str, considering only characters below max.""" |
| 24 | res = 0 |
| 25 | for c in str: |
| 26 | if ord(c) < max: |
| 27 | res += 1 |
| 28 | return res |
| 29 | |
| 30 | def selective_find(str, char, index, pos): |
| 31 | """Return a pair (index, pos), indicating the next occurrence of |
no outgoing calls
no test coverage detected
searching dependent graphs…