Determine if a string is collapsible: Difference between revisions

Content added Content deleted
(Added Algol 68)
Line 1,164: Line 1,164:


function collapsible(string t)
function collapsible(string t)
-- sequence utf32 = utf8_to_utf32(t) -- maybe
-- for i=2 to length(utf32) do -- """
-- if utf32[i]=utf32[i-1] then -- """
for i=2 to length(t) do
for i=2 to length(t) do
if t[i]=t[i-1] then
if t[i]=t[i-1] then