Migrate from old git host
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
namespace BlazorApp1.Helpers;
|
||||
|
||||
public static class FileHelper
|
||||
{
|
||||
public static string RemoveFileEnding(this string fileName)
|
||||
{
|
||||
int endingIndex = fileName.LastIndexOf('.');
|
||||
return fileName.Remove(endingIndex);
|
||||
}
|
||||
|
||||
public static string GetFileNameFromPath(this string path)
|
||||
{
|
||||
return path.Split('/')[^1]; // "Index from end expression". Same as final.length - 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user