\begin{lemma}[Maximal decimal-byte prefix]
Every finite byte list $s$ admits a decomposition $s=DT$ such that every
byte of $D$ is an ASCII decimal digit (its value is between 48 and 57),
and the first byte of $T$, if present, is not an ASCII decimal digit.
\end{lemma}
\begin{proof}
Induct on the list.  For the empty list, take both parts empty.  For
$b::s$, decide whether $48\leq b\leq57$.  If so, apply the induction
hypothesis to $s=DT$ and take $(b::D,T)$.  Every member of the new prefix
is either $b$ or a member of $D$, hence is a digit; the tail property is
unchanged.  If not, take $([],b::s)$; its prefix condition is vacuous and
its tail starts with the stated nondigit.  This establishes all clauses.
\end{proof}
