let index_of_character t ?(from=0) c =     let from = if from <= 0 then 0 else min (length t) from in     try Some (B.index_from t from c)     with _ -> None