file_remove_ext

Declaration

file_remove_ext :: fn (filename: *string)

Description

Removes file name extension. Expects filename in format “foo.ext”, does nothing when input filename does not contain any extensions or is empty. Returned string value is just subset of input string, no allocations and copying is done.

Note

This function is simply looking for the first occourence of . character and does split at that position.

Arguments

  • filename File name to be modified.

Result

File name without extension.

Declared in: file.bl