Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
ClearAll[StringCollapse]
|
||||
StringCollapse[s_String] := FixedPoint[StringReplace[y_ ~~ y_ :> y], s]
|
||||
strings = {"",
|
||||
"\"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 "};
|
||||
Do[
|
||||
Print["«««" <> s <> "»»»"];
|
||||
Print["Length = ", StringLength[s]];
|
||||
Print["«««" <> StringCollapse[s] <> "»»»"];
|
||||
Print["Length = ", StringLength[StringCollapse[s]]]
|
||||
,
|
||||
{s, strings}
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue