Method: rich.cells.cell_len
Calls: 47890, Exceptions: 0, Paths: 2Back
Path 1: 47889 calls (1.0)
' ' (6990) '▄' (1925) 'Step ' (1838) '│' (1695) ' ' (863) ')' (746) '' (721) '(' (714) '1' (695) '=' (658)
_lru_cache_wrapper (47889)
1 (18675) 4 (3717) 5 (3686) 3 (2939) 2 (2561) 6 (2077) 8 (1560) 7 (1419) 9 (1020) 20 (861)
1def cell_len(text: str, _cell_len: Callable[[str], int] = cached_cell_len) -> int:
2 """Get the number of cells required to display text.
3
4 Args:
5 text (str): Text to display.
6
7 Returns:
8 int: Get the number of cells required to display text.
9 """
10 if len(text) < 512:
11 return _cell_len(text)
12 _get_size = get_character_cell_size
13 total_size = sum(_get_size(character) for character in text)
14 return total_size
Path 2: 1 calls (0.0)
'abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcab...
_lru_cache_wrapper (1)
600 (1)
1def cell_len(text: str, _cell_len: Callable[[str], int] = cached_cell_len) -> int:
2 """Get the number of cells required to display text.
3
4 Args:
5 text (str): Text to display.
6
7 Returns:
8 int: Get the number of cells required to display text.
9 """
10 if len(text) < 512:
11 return _cell_len(text)
12 _get_size = get_character_cell_size
13 total_size = sum(_get_size(character) for character in text)
14 return total_size