![]() |
AW: Edit kopieren
Vielleicht ist so etwas gemeint (schnell heruntergetippt und nicht groß getestet)?
Delphi-Quellcode:
function StripNumbers(const sIn: string): string;
const NUMBERS = ['0'..'9']; var i, CurrentLen: integer; begin CurrentLen := 0; SetLength(Result, Length(sIn)); for i := 1 to Length(sIn) do {$IFDEF UNICODE} if not CharInSet(sIn[i], NUMBERS) then {$ELSE} if not (sIn[i] in NUMBERS) then {$ENDIF} begin inc(CurrentLen); Result[CurrentLen] := sIn[i]; end; SetLength(Result, CurrentLen); end; |
AW: Edit kopieren
Hallo,
wie wäre es mit
Delphi-Quellcode:
usw.
StringReplace(S, '1', '', []);
StringReplace(S, '2', '', []); usw. (für eine Schleife ist es zu früh ;) ) Heiko |
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:20 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 by Thomas Breitkreuz