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
Antwort Antwort
DieDolly

Registriert seit: 22. Jun 2018
2.175 Beiträge
 
#1

AW: how to use the option flag rfReplaceAll in ReplaceStr

  Alt 25. Jun 2020, 15:40
Why do you re-declare TReplaceFlags ?

Delphi-Quellcode:
options := [rfReplaceAll];
ReplaceStr(Result,'ä','ae',options);
  Mit Zitat antworten Zitat
Der schöne Günther

Registriert seit: 6. Mär 2013
6.210 Beiträge
 
Delphi 10 Seattle Enterprise
 
#2

AW: how to use the option flag rfReplaceAll in ReplaceStr

  Alt 25. Jun 2020, 15:52
By the way: You will probably want to substitute ß with ss as well
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu
Online

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.531 Beiträge
 
Delphi 12 Athens
 
#3

AW: how to use the option flag rfReplaceAll in ReplaceStr

  Alt 25. Jun 2020, 18:00
Declaring this type is not really right
and it's totally wrong how it was declared. (ENUM <> SET)


ReplaceStr does not have this parameter, because everything is always replaced there and the case sensitivity is controlled by the function name.

Delphi-Quellcode:
// System.StrUtils
S := ReplaceStr(S, Old, New); // same as StringReplace(S, Old, New, [rfReplaceAll])
S := ReplaceText(S, Old, New); // same as StringReplace(S, Old, New, [rfReplaceAll, rfIgnoreCase])

// System.SysUtils
S := StringReplace(S, Old, New, [rfReplaceAll]);

// System.SysUtils : TStringHelper
S := S.Replace(Old, New); // implicit rfReplaceAll
S := S.Replace(Old, New, [rfReplaceAll]);
Ein Therapeut entspricht 1024 Gigapeut.

Geändert von himitsu (25. Jun 2020 um 18:45 Uhr)
  Mit Zitat antworten Zitat
Antwort Antwort

 

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 00:46 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