Reputation: 7105
using Dart How to remove space at the beginning and end of a string?
String name =" Well Wisher ";
or this
String name =" Well Wisher";
or from this
String name ="Well Wisher ";
Upvotes: 9
Views: 5027
Reputation: 7105
Thanks @https://stackoverflow.com/users/5882307/omi-shah the .trim() function is used to remove white space from the front and end of a string
String name =" Well Wisher ";
name.trim(); // "Well Wisher"
Upvotes: 14