Files
PepApi.Core/PepLib.Core/Util.cs
AJ 7c5b4ded5f chore(PepLib.Core): remove unused using directives and clean up formatting
Remove unnecessary System, System.Collections.Generic, System.IO, and
System.Linq using directives that were flagged by IDE analyzers. Also
includes minor whitespace and code style normalization.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 07:52:17 -05:00

31 lines
788 B
C#

using System.Diagnostics;
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;
}
}
}