Use the replace() method to insert a space before the capital letters in a string, e.g. str. replace(/[A-Z]/g, ' $&'). trim() . The replace method will return a new string, where each capital letter is replaced by a space preceding the capital letter.
" " + x : x. ToString())). TrimStart(' '); This should work.
i need to parse some data and i want to convert
AutomaticTrackingSystem
to
Automatic Tracking System
essentially putting a space before any capital letter (besides the first one of course)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With