AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Sonstige Fragen zu Delphi how to use the option flag rfReplaceAll in ReplaceStr
Thema durchsuchen
Ansicht
Themen-Optionen

how to use the option flag rfReplaceAll in ReplaceStr

Ein Thema von piedad · begonnen am 25. Jun 2020 · letzter Beitrag vom 25. Jun 2020
 
piedad

Registriert seit: 5. Jun 2020
10 Beiträge
 
#1

how to use the option flag rfReplaceAll in ReplaceStr

  Alt 25. Jun 2020, 15:39
Hallo Guys,
I Need some help. I am trying something very simple: to build a function to calculate the email addresse from the first Name and last Name for a loop in a QDA Batch.
Since i am Living in Germany know, I am using the german Keyboard, so I have to replace my ä with ae, and so on.
Not a big deal. But trying to use the Option rfReplaceAll I am getting stucked.
I tried to define it as a type, as a set, Nothing is working with an Syntax Error. Could you give me a hint? I am sure it is because a Little type Definition and I am new in Delphi.:
Many thanks in Advance and best regards
Piedad

Here is my last code

// calculate the email adresse from the related PErson
function eMailAdresseCalculator(Person: String): string ;
type
TReplaceFlags = [rfReplaceAll, rfIgnoreCase];
var
FirstName : String;
LastName : String
joint : Index;
options : TReplaceFlags;

begin

joint := Pos(' ', Person);
FirstName:= LowerCase(Trim(LeftStr(Person,joint)));
LastName := LowerCase(Trim(RightStr(Person,(Length(Person)-joint))));
options := rfReplaceAll;

Result := FirstName + '.' + LastName +'@Firma.com';
Result := ReplaceStr(Result,'ä','ae',options);
Result := ReplaceStr(Result,'ö','oe',options);
Result := ReplaceStr(Result,'ü','ue',options);

end;
  Mit Zitat antworten Zitat
 

 

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:26 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz