I have a i/p message line,consisting of some writing,some nos.etc. Now, anywhere in the msg there can be more than one space. I want to remove the spaces to one space if the
spaces are not at starting,or if its at staring then I
dont need any space.
for eg.
'a/c balace is $200.00 name is smith' sholud be
''a/c balace is $200.00 name is smith'
and if
' 'a/c balace is $200.00',I need it to be
'a/c balace is $200.00'
Please suggest me a way out.
spaces are not at starting,or if its at staring then I
dont need any space.
for eg.
'a/c balace is $200.00 name is smith' sholud be
''a/c balace is $200.00 name is smith'
and if
' 'a/c balace is $200.00',I need it to be
'a/c balace is $200.00'
Please suggest me a way out.