Email notification for LeafWeb jobs
This commit is contained in:
@@ -32,6 +32,11 @@ namespace LeafWeb.Core.Utility
|
||||
return char.ToLowerInvariant(s[0]) + s.Substring(1);
|
||||
}
|
||||
|
||||
public static string WhitespaceToUnderscore(this string str)
|
||||
{
|
||||
return Regex.Replace(str, @"\s+", "_");
|
||||
}
|
||||
|
||||
public static byte[] GetBytes(this string str)
|
||||
{
|
||||
return System.Text.Encoding.Default.GetBytes(str);
|
||||
@@ -47,6 +52,11 @@ namespace LeafWeb.Core.Utility
|
||||
return Regex.Replace(input, @"[^\w_]", "");
|
||||
}
|
||||
|
||||
public static string FilterValidFilename(this string input)
|
||||
{
|
||||
return Regex.Replace(input, @"[^\w_\-\.]", "");
|
||||
}
|
||||
|
||||
public static string FilenameFromPath(this string path)
|
||||
{
|
||||
return Regex.Replace(path, @".*/([^/]*$)", "$1");
|
||||
|
||||
Reference in New Issue
Block a user