seq.CountOf(x)
This commit is contained in:
parent
1a278a164b
commit
06db422b61
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "7";
|
||||
public const string Build = "1";
|
||||
public const string Revision = "2760";
|
||||
public const string Revision = "2762";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%COREVERSION%=1
|
||||
%REVISION%=2760
|
||||
%REVISION%=2762
|
||||
%MINOR%=7
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.7.1.2760
|
||||
3.7.1.2762
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.7.1.2760'
|
||||
!define VERSION '3.7.1.2762'
|
||||
|
|
|
|||
|
|
@ -9798,7 +9798,6 @@ begin
|
|||
end;
|
||||
|
||||
|
||||
|
||||
/// Возвращает отсортированную по возрастанию последовательность
|
||||
function Sorted<T>(Self: sequence of T): sequence of T; extensionmethod;
|
||||
begin
|
||||
|
|
@ -10314,6 +10313,15 @@ end;
|
|||
|
||||
// ToDo Сделать AdjacentGroup с функцией сравнения
|
||||
|
||||
/// Возвращает количество элементов, равных указанному значению
|
||||
function CountOf<T>(Self: sequence of T; x: T): integer; extensionmethod;
|
||||
begin
|
||||
Result := 0;
|
||||
foreach var y in Self do
|
||||
if y = x then
|
||||
Result += 1;
|
||||
end;
|
||||
|
||||
// -----------------------------------------------------
|
||||
//>> Методы расширения списков # Extension methods for List T
|
||||
// -----------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -9798,7 +9798,6 @@ begin
|
|||
end;
|
||||
|
||||
|
||||
|
||||
/// Возвращает отсортированную по возрастанию последовательность
|
||||
function Sorted<T>(Self: sequence of T): sequence of T; extensionmethod;
|
||||
begin
|
||||
|
|
@ -10314,6 +10313,15 @@ end;
|
|||
|
||||
// ToDo Сделать AdjacentGroup с функцией сравнения
|
||||
|
||||
/// Возвращает количество элементов, равных указанному значению
|
||||
function CountOf<T>(Self: sequence of T; x: T): integer; extensionmethod;
|
||||
begin
|
||||
Result := 0;
|
||||
foreach var y in Self do
|
||||
if y = x then
|
||||
Result += 1;
|
||||
end;
|
||||
|
||||
// -----------------------------------------------------
|
||||
//>> Методы расширения списков # Extension methods for List T
|
||||
// -----------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue