```python def first_word_length(text: str) -> int: words = text.split() return len(words[0]) if words else 0 ```