Splits
Split = Parse[List[str]]
module-attribute
Represents split functions.
split_lines = split_at(NEW_LINE)
module-attribute
Splits the string by NEW_LINE.
split_double_lines = split_at(DOUBLE_NEW_LINE)
module-attribute
Splits the string by DOUBLE_NEW_LINE.
split_at(separator: str) -> Split
Creates split functions that split the string by separator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
separator |
str
|
The separator to split the string by. |
required |
Returns:
| Type | Description |
|---|---|
Split
|
The |
Source code in aoc/ext/splits.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |
split_whitespace(string: str) -> List[str]
Splits the string by whitespace.
This is equivalent to:
string.split()
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string |
str
|
The string to split. |
required |
Returns:
| Type | Description |
|---|---|
List[str]
|
The split result. |
Source code in aoc/ext/splits.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |