c# - How can Replace infinite loop? -


I am working on nothing but incompetent C # code which wants to remove the spaces, it does this:

= 0) b = b.Replace ("\ n \ n", "\ n");

Input from one place (for example) \ n \ n \ nThe input does not conflict, therefore a loop is required. I think this should work, and it usually does

but sometimes it manages to join an infinite loop, and I do not know how

< P> Any ideas?

Will this work:

  string c = Regex Replace (b, "\ n \ n +", "\ n");  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -