Tuesday, January 23, 2018

c# - Opposite of String.Split with separators (.net)



Is there a way to do the opposite of String.Split in .Net? That is, to combine all the elements of an array with a given separator.




Taking ["a", "b", "c"] and giving "a b c" (with a separator of " ").



UPDATE: I found the answer myself. It is the String.Join method.


Answer



Found the answer. It's called String.Join.


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...