Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transformations on returned data set
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01573095
Message ID:
01573421
Vues:
42
>>
>>(not finished since I now need replicate function in C# - I found this http://stackoverflow.com/questions/3754582/is-there-an-easy-way-to-return-a-string-repeated-x-number-of-times and wondering if I should go with String.Concat or create an extension - (if we don't have it already).
>
>Just use something like "".PadLeft(5, '*')
>
>Or whatever length/char you want to repeat.

Right, but I want to be able to repeat a string. In other words, I need to have VFP replicate function that works with strings.
In that link I like the answer with 22 helpful votes - I am going to add this as an extension. I can have a separate version for single character.

UPDATE. I've added both versions of this function (for char and string) to our library project.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform