How can I get a parse String of city name without whitespaces (on the start and at the end) and with "%20" instead of " " (which contains some city names) in android.
For example I would like to parse:
" Oklahoma " -> "Oklahoma"
or
" Oklahoma City" -> "Oklahoma%20City"