pub(crate) fn before_first_colon(s: &str) -> &strExpand description
Strips suffix beginning at first ‘:’; returns subslice before colon.
§Performance
- Single forward traversal
O(n); avoids UTF-8 decoding (colon is ASCII). - Simple explicit loop similar in cost to
find(':').