Thema: Delphi Format-Strings

Einzelnen Beitrag anzeigen

Robert_G
(Gast)

n/a Beiträge
 
#10

Re: Format-Strings

  Alt 19. Jul 2004, 18:57
Zitat von Robert Marquardt:
Genau. Delphi und C sind auch noch dezent inkompatibel bei den Format-Strings.
Vielleicht koennten wir mal ein Projekt dazu anleiern.
Ist gar nicht nötig, unter .Net funktioniert es gleich, egal ob c# oder Delphi.Net (bis auf das nervige "System."):
Delphi-Quellcode:
System.String.Format('{0} - {1} ({2,2:00}:{3,2:00} min)'
                    ,['Filter', 'Welcome to the Fold', 7, 40]);
Code:
String[b][color=#ff0000].[/color][color=#3600aa]Format[/color][color=#ff0000]([/color][/b][color=#ad0000]"{0} - {1} ({2,2:00}:{3,2:00} min)"[/color]
             [b][color=#ff0000],[/color][/b][color=#3600aa]new[/color] [b]Object[color=#ff0000][] {[/color][/b][color=#ad0000]"Van Halen"[/color][b][color=#ff0000], [/color][/b][color=#ad0000]"Running with the devil"[/color][b][color=#ff0000], [/color][/b][color=#ad00bb]3[/color][b][color=#ff0000], [/color][/b] [color=#ad00bb]34[/color] [b][color=#ff0000]});[/color][/b]
  Mit Zitat antworten Zitat