# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/03_strs.ipynb.

# %% auto 0
__all__ = ['first_line', 'first_digit_loc']

# %% ../nbs/03_strs.ipynb 4
from ispec.utils import idx1st

# %% ../nbs/03_strs.ipynb 6
def first_line(s: str) -> str:
    return s.split('\n')[0]

def first_digit_loc(s: str) -> int:
    return idx1st(*s, flag=lambda e: str.isdigit(e) or e == ' ')
