String Manipulating | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

String Manipulating

I have three string and Iā€™m trying to write a function that solve my problem. It take a string with some extra space around and Iā€™m trying to cleaning it up so it looks pretty nice. Between each word it has one space until the last two words. It depends how many spaces is between them it returns it just like it passed in. See my example: https://code.sololearn.com/cgSraXYf0fiS/?ref=app

17th Apr 2022, 2:12 AM
Yones Mussa
3 Respostas
0
https://code.sololearn.com/c1lm0XjwZzLO/?ref=app Here is the solution
17th Apr 2022, 6:48 AM
Yones Mussa
+ 1
Thats not the case in here Ani Jona šŸ•Š. If i wanna to replace all spaces this woulf be good idea. But i wanna replace all extra spaces except the last one. I wanna to keep the spaces.
17th Apr 2022, 6:42 AM
Yones Mussa
0
Ani Jona šŸ•Š I appreciate your time :)
17th Apr 2022, 6:53 AM
Yones Mussa