Linq query to manipulate a string

Refer this post