Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi
i got this sentence such as (p1 and p2),i want to keep Structure , i only want to replace p1,p2 to my own variable and change it this sentence for example (v1 and v2),and my Language is c#.net
thanks a lot
Posted
Updated 10-May-12 5:17am
v2
Comments
bbirajdar 10-May-12 9:07am    
not clear....
Ed Nutting 10-May-12 9:08am    
This is very unclear. Please improve your question - at the moment I have no clue what you are trying to do. What sort of sentence? An English sentence or is this some form of sentence you've made up?

Thanks,
Ed
Sandeep Mewara 10-May-12 11:10am    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.

Use strtok() and sprintf() if C++, or String.Split() and String.Format() if C# or VB.NET.
 
Share this answer
 
As you haven't stated what your requirements really are, given the problem description you've shown you could simply replace the comma with and in a straightforward text replacement. For instance (and I'm assuming C# here since you haven't even said which language:
C#
string text = "V1,V2";
Console.WriteLine(string.Replace(",", " and ");
You really need to say what your requirements really are before you'll get much better as an answer.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900