Check GIF max framerate, minor QOL & logging improvements

This commit is contained in:
N00MKRAD
2021-01-07 12:15:13 +01:00
parent dc9035caa1
commit 124aa6bfb4
9 changed files with 36 additions and 19 deletions

View File

@@ -124,6 +124,17 @@ namespace Flowframes
return str.Replace(stringToRemove, "");
}
public static string TrimWhitespacesSafe (this string str) // Trim whitespaces, unless they are "quoted" (to avoid trimming file paths)
{
var result = str.Split('"').Select((element, index) => index % 2 == 0 ? element.TrimWhitespaces() : element.Wrap());
string resultJoined = string.Join("", result);
result = resultJoined.Split('\'').Select((element, index) => index % 2 == 0 ? element.TrimWhitespaces() : "'" + element + "'");
resultJoined = string.Join("", result);
return resultJoined;
}
public static string TrimWhitespaces(this string str)
{
if (str == null) return str;