Foundational Rework (Round 2) (#2767)
This commit is contained in:
parent
304fd8bc79
commit
fc87dba0a7
29 changed files with 249 additions and 84 deletions
|
|
@ -1130,4 +1130,15 @@ public static class Parser
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static string RemoveExtensionIfSupported(string? filename)
|
||||
{
|
||||
if (string.IsNullOrEmpty(filename)) return filename;
|
||||
|
||||
if (Regex.IsMatch(filename, SupportedExtensions))
|
||||
{
|
||||
return Regex.Replace(filename, SupportedExtensions, string.Empty);
|
||||
}
|
||||
return filename;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue