Skip to content

Commit 9d72e93

Browse files
authored
api: add Match::len method
PR #97
1 parent 9af8bb9 commit 9d72e93

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/lib.rs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,12 @@ impl Match {
275275
self.end
276276
}
277277

278+
/// The length, in bytes, of the match.
279+
#[inline]
280+
pub fn len(&self) -> usize {
281+
self.len
282+
}
283+
278284
/// Returns true if and only if this match is empty. That is, when
279285
/// `start() == end()`.
280286
///

0 commit comments

Comments
 (0)