Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
|
|
@ -0,0 +1,24 @@
|
|||
##
|
||||
function Collapse(s: String) :=
|
||||
if String.IsNullOrEmpty(s) Then ''
|
||||
else s[1] +
|
||||
new String(Range(2, s.Length)
|
||||
.Where(i -> s[i] <> s[i - 1])
|
||||
.Select(i -> s[i])
|
||||
.ToArray);
|
||||
|
||||
var input :=
|
||||
|'',
|
||||
'The better the 4-wheel drive, the further you''ll be from help when ya get stuck!',
|
||||
'headmistressship',
|
||||
'"If I were two-faced, would I be wearing this one? --- Abraham Lincoln "',
|
||||
'..1111111111111111111111111111111111111111111111111111111111111117777888',
|
||||
'I never give ''em hell, I just tell the truth, and they think it''s hell. ',
|
||||
' --- Harry S Truman '|;
|
||||
|
||||
foreach var s in input do
|
||||
begin
|
||||
Writeln('old: ', s.Length, ' «««', s, '»»»');
|
||||
var c := Collapse(s);
|
||||
WriteLn('new: ', c.Length, ' «««', c, '»»»')
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue