Saxonite 1.2.10.4
This commit is contained in:
@@ -15,6 +15,7 @@ namespace Sarand.Net.Standard.Base.Utils
|
||||
// Definitions.
|
||||
public static Regex RegEx_Whitespace = new Regex("\\s+");
|
||||
public static Regex RegEx_Whitespace_Match = new Regex("^\\s+$");
|
||||
public static Regex RegEx_LineDelimiters = new Regex(@"\r\n?|\n");
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
@@ -276,6 +277,18 @@ namespace Sarand.Net.Standard.Base.Utils
|
||||
return value.Replace(search.ToString(), search.ToString() + search.ToString());
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>
|
||||
/// Replace all line delimiters (\r\n or \n).
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="replace"></param>
|
||||
/// <returns></returns>
|
||||
public static String ConsolidateLineDelimiters(this String value, String replace = "\n")
|
||||
{
|
||||
return RegEx_LineDelimiters.Replace(value, replace);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// E x t r a c t i o n
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user