mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-19 01:39:26 +01:00
Fixed image sequence output
This commit is contained in:
@@ -97,9 +97,12 @@ namespace Flowframes
|
||||
return Regex.Split(str, "\r\n|\r|\n");
|
||||
}
|
||||
|
||||
public static string Trunc(this string value, int maxChars)
|
||||
public static string Trunc(this string value, int maxChars, bool addEllipsis = true)
|
||||
{
|
||||
return value.Length <= maxChars ? value : value.Substring(0, maxChars) + "…";
|
||||
string str = value.Length <= maxChars ? value : value.Substring(0, maxChars);
|
||||
if(addEllipsis)
|
||||
str += "…";
|
||||
return str;
|
||||
}
|
||||
|
||||
public static string StripBadChars(this string str)
|
||||
@@ -142,5 +145,15 @@ namespace Flowframes
|
||||
}
|
||||
return newString.ToString();
|
||||
}
|
||||
|
||||
public static string ReplaceLast (this string str, string stringToReplace, string replaceWith)
|
||||
{
|
||||
int place = str.LastIndexOf(stringToReplace);
|
||||
|
||||
if (place == -1)
|
||||
return str;
|
||||
|
||||
return str.Remove(place, stringToReplace.Length).Insert(place, replaceWith);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user