ext_name

Crates.ioext_name
lib.rsext_name
version0.1.1
created_at2025-09-09 08:49:09.14526+00
updated_at2025-09-09 08:49:09.14526+00
descriptionext_name
homepagehttps://github.com/i18n-site/rust/tree/dev/ext_name
repositoryhttps://github.com/i18n-site/rust.git
max_upload_size
id1830436
size25,363
i18n.site (i18nsite)

documentation

README

ext_name

pub fn ext_name(path: &str) -> Option<&str> {
  let len = path.len();
  if len > 1
    && let Some(pos) = path[..len - 1].rfind('.')
  {
    return Some(&path[pos + 1..len]);
  }
  None
}

About

This project is an open-source component of i18n.site ⋅ Internationalization Solution.

关于

本项目为 i18n.site ⋅ 国际化解决方案 的开源组件。

Commit count: 68

cargo fmt