| :: Trim ALL thos extra spaces in a String |
Author |
Brian Gillham |
Language |
VB5, VB6 |
Operating
Systems |
Windows 95, 98 and NT |
| Module |
Public Function TrimALL(ByVal TextIN As String) As String
TrimALL = Trim(TextIN)
While InStr(TrimALL, String(2, " ")) > 0
TrimALL = Replace(TrimALL, String(2, " "), " ")
Wend
End Function
|
| Usage |
Private Sub Command1_Click()
MsgBox TrimALL("Hello ! ! ! This function removes all extra spaces from strings")
End Sub
|
|
 |
|
 |