Split a character string based on change of character: Difference between revisions
Content added Content deleted
m (add output) |
m (→{{header|D}}) |
||
Line 643: | Line 643: | ||
writeln(); |
writeln(); |
||
}</lang> |
}</lang> |
||
=={{header|Easyprog.online}}== |
|||
<lang>a$ = "gHHH5YY++///\" |
|||
a$[] = str_split a$ |
|||
c$ = a$[0] |
|||
for i range len a$[] |
|||
if a$[i] <> c$ |
|||
b$ &= ", " |
|||
c$ = a$[i] |
|||
. |
|||
b$ &= a$[i] |
|||
. |
|||
print b$</lang> |
|||
=={{header|Elixir}}== |
=={{header|Elixir}}== |