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; } } }