Hi I'm now into data structures:
this is the problem:
string s = "abcdef"
char[] mychar = string.TocharArray();
int Length = s.length;
StringBuilder sb = new StringBuilder(Length);
-------Basically I need to construt a new string with the last two character iterated twice if the string = the same string.
does anybody now how?
the result would be "abcdgh"---> note the last two character are iterated twice
virgilio
0
Newbie Poster
Recommended Answers
Jump to PostSorry, seems I didn't understand you well, you need to get last two characters and increment their value (means if input string xxxxAB so the result should be xxxxBC)?
if yes get last 2 characters get each of which increment thier ascii value by 1. that's my solution, if you …
All 4 Replies
Ramy Mahrous
401
Postaholic
Featured Poster
virgilio
0
Newbie Poster
virgilio
0
Newbie Poster
chsarp_vijay
-3
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.