To remove multiple, redundant spaces from inside strings and replace them with a single space.
It might be straightforward if you're familiar with regular expressions, but it took me a while to find something that worked.
B4X:
Sub RemoveRedundantSpace(TextToClean As String) As String
Dim jo As JavaObject = Regex.matcher("[ ]{2,}", TextToClean)
Return jo.RunMethod("replaceAll", Array(" "))
End Sub
It might be straightforward if you're familiar with regular expressions, but it took me a while to find something that worked.