[Lazarus] FlipText

silvioprog silvioprog at gmail.com
Fri Oct 22 03:38:07 CEST 2010


Hi guys, sorry  for my delay...

I made this:

function FlipText(AText: string): string;
var
  I: Integer;
begin
  AText := LowerCase(AText);
  for I := 1 to Length(AText) do
  begin
    case AText[I] of
      'a': Result := 'ɐ' + Result;
      'b': Result := 'q' + Result;
      'c': Result := 'ɔ' + Result;
      'd': Result := 'p' + Result;
      'e': Result := 'ǝ' + Result;
      'f': Result := 'ɟ' + Result;
      'g': Result := 'b' + Result;
      'h': Result := 'ɥ' + Result;
      'i': Result := 'ı' + Result;
      'j': Result := 'ɾ' + Result;
      'k': Result := 'ʞ' + Result;
      'l': Result := 'ן' + Result;
      'm': Result := 'ɯ' + Result;
      'n': Result := 'u' + Result;
      'p': Result := 'd' + Result;
      'q': Result := 'b' + Result;
      'r': Result := 'ɹ' + Result;
      't': Result := 'ʇ' + Result;
      'u': Result := 'n' + Result;
      'v': Result := 'ʌ' + Result;
      'w': Result := 'ʍ' + Result;
      'y': Result := 'ʎ' + Result;
      '.': Result := '˙' + Result;
      ',': Result := '''' + Result;
      '''': Result := ',' + Result;
      '"': Result := ',,' + Result;
      ';': Result := '؛' + Result;
      '!': Result := '¡' + Result;
      #161: Result := '!' + Result;
      '?': Result := '¿' + Result;
      #191: Result := '?' + Result;
      '[': Result := ']' + Result;
      ']': Result := '[' + Result;
      '(': Result := ')' + Result;
      ')': Result := '(' + Result;
      '{': Result := '}' + Result;
      '}': Result := '{' + Result;
      '<': Result := '>' + Result;
      '>': Result := '<' + Result;
      '_': Result := '‾' + Result;
    else
      Result := AText[I] + Result;
    end;
  end;
end;

Is not the 'best funtion', but it's something. ^^

-- 
Silvio Clécio,
*programmer* *ObjectPascal*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20101021/68f7eff5/attachment-0004.html>


More information about the Lazarus mailing list