UtilTextFilesSortByT(String, String, ListSortDirection, FuncString, T, Encoding) Method
Sorts the lines of the source textfile by evaluating the result of the given condition.
then writes the result in the target textfile.
Namespace: DevCase.Core.DataProcessing.TextFilesAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static void SortBy<T>(
string sourceFilepath,
string targetFilepath,
ListSortDirection sortDirection,
Func<string, T> sortExpr,
Encoding enc = null
)
Public Shared Sub SortBy(Of T) (
sourceFilepath As String,
targetFilepath As String,
sortDirection As ListSortDirection,
sortExpr As Func(Of String, T),
Optional enc As Encoding = Nothing
)
Dim sourceFilepath As String
Dim targetFilepath As String
Dim sortDirection As ListSortDirection
Dim sortExpr As Func(Of String, T)
Dim enc As Encoding
UtilTextFiles.SortBy(sourceFilepath, targetFilepath,
sortDirection, sortExpr, enc)
public:
generic<typename T>
static void SortBy(
String^ sourceFilepath,
String^ targetFilepath,
ListSortDirection sortDirection,
Func<String^, T>^ sortExpr,
Encoding^ enc = nullptr
)
static member SortBy :
sourceFilepath : string *
targetFilepath : string *
sortDirection : ListSortDirection *
sortExpr : Func<string, 'T> *
?enc : Encoding
(* Defaults:
let _enc = defaultArg enc null
*)
-> unit
No code example is currently available or this language may not be supported.
- sourceFilepath String
-
The source textfile path.
- targetFilepath String
-
The target textfile path.
- sortDirection ListSortDirection
-
The sorting direction.
- sortExpr FuncString, T
-
The sorting expression to evaluate.
- enc Encoding (Optional)
-
The file encoding used to read/write the textfile.
- T
This is a code example.
No code example is currently available or this language may not be supported.
SortBy("C:\old file.txt", "C:\new file.txt", ListSortDirection.Ascending, Function(line As String) line.EndsWith("5"), Encoding.Default)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.