Added Files

This commit is contained in:
2025-10-27 18:48:23 -04:00
commit ab916dc82a
89 changed files with 7575 additions and 0 deletions

32
PepLib.Core/Util.cs Normal file
View File

@@ -0,0 +1,32 @@
using System;
using System.Diagnostics;
using System.IO;
namespace PepLib
{
public static class Util
{
public static string GetNestFileFormat(string filename)
{
try
{
var name = Path.GetFileName(filename);
var ext = Path.GetExtension(name);
if (name.LastIndexOf(ext) > 5 && !name.Contains("-"))
name = name.Insert(5, "-");
if (name.LastIndexOf(ext) > 8 && char.IsLetter(name[8]))
name = name.Remove(8, 1);
return Path.Combine(Path.GetDirectoryName(filename), name);
}
catch (SystemException ex)
{
Debug.WriteLine(ex.Message);
}
return string.Empty;
}
}
}