Answers for "remove spaces from string"

5

remove trailing and leading spaces in python

text = "   Hello World        "
text.strip()
# Hello World
Posted by: Guest on November-08-2020
4

java 8 remove spaces from string

a.replaceAll("\\s+","");
Posted by: Guest on April-14-2020
-1

regex to remove spaces

//..
return str.replace(/\s/g, '');
//..
Posted by: Guest on October-06-2020
1

remove space from string java

// This is Fasted Way 
str = str.replaceAll("\\s" , "");
Posted by: Guest on September-30-2021
11

python delete white spaces

sentence = ' hello  apple'
sentence.strip()
>>> 'hello  apple'
Posted by: Guest on May-08-2020
4

trimming spaces in string python

a = "      yo!      "
b = a.strip() # this will remove the white spaces that are leading and trailing
Posted by: Guest on June-20-2020

Code answers related to "remove spaces from string"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language