Skip to content

Planet-Source-Code/brian-gillham-trim-all-those-extra-spaces__1-25713

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Trim all those EXTRA spaces

Description

VB forgot to add a Function strip out all those LEADING, TRAILING and EXTRA spaces in ONE Function.

I have seen many attempts at doing this but think mine does it in the least amount of code.

Note: = literal SPACE

More Info

String eg:Stripall

Stripall

Submitted On
By Brian Gillham
Level Beginner
User Rating 4.5 (27 globes from 6 users)
Compatibility VB 6.0, ASP (Active Server Pages)
Category String Manipulation
World Visual Basic
Archive File

Source Code

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published