Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reformatting a string
Message
De
11/12/2007 16:44:22
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01274953
Message ID:
01274959
Vues:
10
>I'm writing a system that receives data from another system using c#. I'm wondering if there is a easy way to parse or transform a string.
>
>example:
>data comes as: (555)555-1234
>Need to convert to: 555-555-1234
>
>I'm planning on just looping through the length of the string and looking for the ( ), but I thought C# might have a wonder tool I could use.
>
>Thanks
>
>Kirk

Can you run it through a method to strip all non-numeric characters, and then re-format it like you want? Or are you looking for something a little more general?
Very fitting: http://xkcd.com/386/
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform