Skip to main content

language_for_extension

Function language_for_extension 

Source
pub fn language_for_extension(ext: &str) -> Option<&'static str>
Expand description

Returns the language identifier for the given file extension, or None if unsupported.

The lookup is case-insensitive. Supported extensions include rs, py, go, java, ts, tsx, js, mjs, cjs, c, cc, cpp, cxx, h, hpp, hxx, cs, and Fortran variants f, f77, f90, f95, f03, f08, for, ftn.