diff --git a/src/lib.rs b/src/lib.rs index 863f5e6..667dd6d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -58,5 +58,5 @@ pub use self::{ config::Config, language::{Language, LanguageType, Languages}, sort::Sort, - stats::{CodeStats, Report}, + stats::{find_char_boundary, CodeStats, Report}, }; diff --git a/src/stats.rs b/src/stats.rs index fe2c25f..a5f271a 100644 --- a/src/stats.rs +++ b/src/stats.rs @@ -93,7 +93,8 @@ impl ops::AddAssign for Report { } } -fn find_char_boundary(s: &str, index: usize) -> usize { +#[doc(hidden)] +pub fn find_char_boundary(s: &str, index: usize) -> usize { for i in 0..4 { if s.is_char_boundary(index + i) { return index + i;