Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function RemoveVowels(const Value: string): string;
- var
- C: PChar;
- I: Integer;
- const
- CharSet = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'];
- begin
- Result := '';
- if Value <> '' then
- begin
- I := 1;
- SetLength(Result, Length(Value));
- C := PChar(Value);
- while C^ <> #0 do
- begin
- if not (C^ in CharSet) then
- begin
- Result[I] := C^;
- Inc(I);
- end;
- Inc(C);
- end;
- SetLength(Result, I - 1);
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement