Module src.qollib.strings.numeric

Functions

def extract_int(string: str) ‑> int

Extracts an integer from a string with a number. If multiple numbers, seperated by nun number characters, exist, the first one will be extracted.

def num_compare(string_a: str, string_b: str) ‑> int
def sort_num(strings: list) ‑> list

Applies a sorting algorithm to a list of strings containing an integer number. Selecting the first integer of the string and sort by it (regardless of zero-padded or not)