Skip to main content

fits_one_batch

Function fits_one_batch 

Source
pub fn fits_one_batch(s: &str, n: usize) -> bool
Expand description

s が 1 つの切れ端(n 文字以下)に収まるか。

バイト数が n 以下なら文字数も n 以下なので、数えずに真を返す(短い文字列で数えない)。