C#: How to detect . in string and insert a space after it/How to insert space after n chars?
- by Sam Gentile
Suppose I have a long string like "4600airportburlingame150anzablvd.burlingamecalifornia94010". My code is breaking on this string. This is UNUSUAL. 99% of entries will NOT have a period. The CSS in the browser wraps IF there are spaces in the string and there isn't any here.
How do I detect the period (".") and insert a space directly after it? Remember 99% of strings will NOT have a period in them. The code has to detect if it has a period and if so, do the insertion, otherwise not.
If I determine a maximum string length, how do I insert a space at some length?
Thanks