mreister

mreister

  • NA
  • 3
  • 0

string.insert problem

Nov 29 2003 8:59 PM
I am trying to trim s3 off the end of stringToSplit. It splits into the array ok but when i call string.insert() it simply doesn't add anything to newString. here is the code: string stringToSplit = "s1/s2/s3"; string[] stringArray = stringToSplit.Split('/'); string newString = ""; for(int y = 0;y != stringArray.Length - 1;y++) { newString.Insert(newString.Length,stringArray[y].ToString()); }

Answers (6)