Fit the text in to given width by chopping in to lines. Args: width (int): Maximum characters in a line. Returns: Lines: Lines container.
(self, width: int)
| 1250 | return lines |
| 1251 | |
| 1252 | def fit(self, width: int) -> Lines: |
| 1253 | class="st">"""Fit the text in to given width by chopping in to lines. |
| 1254 | |
| 1255 | Args: |
| 1256 | width (int): Maximum characters in a line. |
| 1257 | |
| 1258 | Returns: |
| 1259 | Lines: Lines container. |
| 1260 | class="st">""" |
| 1261 | lines: Lines = Lines() |
| 1262 | append = lines.append |
| 1263 | for line in self.split(): |
| 1264 | line.set_length(width) |
| 1265 | append(line) |
| 1266 | return lines |
| 1267 | |
| 1268 | def detect_indentation(self) -> int: |
| 1269 | class="st">"""Auto-detect indentation of code. |