Connect with us!
What is a leading or trailing space?
Leading Space
In general, a leading space is referred as a space or multiple space located before the first character or a text entry field or a String variable in programming.
![Leading space in Search Bar](https://www.salowstudios.com/wp-content/uploads/2023/01/image.png)
str = " Apple"
Trailing Space
Simmilarly, a leading space is referred as a space or multiple space located after the last character or a text entry field or a String variable in programming.
![Trailing space in Search Bar](https://www.salowstudios.com/wp-content/uploads/2023/01/image-1.png)
str = "Apple "