Split a character string based on change of character: Difference between revisions
Split a character string based on change of character (view source)
Revision as of 21:29, 29 December 2023
, 5 months ago→{{header|ALGOL 68}}: Remove unnecessary "Works with" and unused variable
(→K: add) |
m (→{{header|ALGOL 68}}: Remove unnecessary "Works with" and unused variable) |
||
Line 283:
=={{header|ALGOL 68}}==
<syntaxhighlight lang="algol68">BEGIN
# returns s with ", " added between each change of character #
Line 295 ⟶ 294:
[ 3 * ( ( UPB s - LWB s ) + 1 ) ]CHAR result;
INT r pos := LWB result;
CHAR s char := s[ LWB s ];
FOR s pos FROM LWB s TO UPB s DO
|