Function

My aim is to remove the second consonant if the letter before is also a constant. Ex: from "best friend" to "best riend"...
I tried this:

<i>DeleteDubleLetter(word : Text) finalstring : Text</i>

Array_Vocals[1] := 'a';
Array_Vocals[2] := 'e';
Array_Vocals[3] := 'i';
Array_Vocals[4] := 'o';
Array_Vocals[5] := 'u';

FOR i := 1 TO STRLEN(word)+1 DO
IF word <> ' ' THEN
partial += FORMAT(word);

FOR i := 1 TO STRLEN(partial)+1 DO
IF partial <> partial[i+1] THEN
IF NOT(isVocal(partial) = isVocal(partial[i+1])) THEN
finalstring += FORMAT(partial);

But it doesn't work... can anybody help me? Thanks!

Best Answer

Answers

Sign In or Register to comment.