I am an OpenEdge (aka Progress) developer that loves clean code and good looking applications that are easy to use. My main pet project is the Progress DataDigger
/* Progress 4GL Daily Challenge #259
*/
FUNCTION dupDecode RETURNS CHARACTER (pcString AS CHARACTER):
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DO i = 1 TO LENGTH(pcString):
pcString = REPLACE( pcString
, SUBSTRING(pcString,i,1)
, STRING(NUM-ENTRIES(pcString,SUBSTRING(pcString,i,1)) = 2,'(/)')
).
END.
RETURN pcString.
END FUNCTION.
MESSAGE dupDecode('Success')
VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Discussion on: Daily Challenge #259 - Duplicate Encoder
For further actions, you may consider blocking this person and/or reporting abuse