Remove Extra Space from a string

Quickly remove extra whitespace from inside a string.

Function fSQLSpalten(ByVal sSpaltenZeile$) As String

sSpaltenZeile = Trim(sSpaltenZeile)
Do While InStr(1, sSpaltenZeile, " ") > 0
sSpaltenZeile = fReplace(sSpaltenZeile, " ", " ")
Loop
fSQLSpalten = sSpaltenZeile
End Function

0 comments:

Post a Comment