rj-action-library/Runtime/Text/Text.cs

28 lines
478 B
C#
Raw Normal View History

2025-07-03 08:34:35 +00:00
using System.Collections;
using System.Collections.Generic;
namespace Rokojori
{
public static class Text
{
public static string EscapeAsPathForCommandLine( this string path )
{
var escaped = path.Replace( "\"", "\\\"" );
return $"\"{escaped}\"";
}
public static string EnsureEndsWith( this string path, string ending )
{
if ( ! path.EndsWith( ending ) )
{
path += ending;
}
return path;
}
}
}