VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Squeeze

John Bambrick  (1 Submission)   String Manipulation   Visual Basic 3.0   Beginner   Wed 3rd February 2021

Removes extra spaces from given string. eg. Squeeze("^^too^^many^^^spaces^^")returns "too^many^spaces". NB.Read a carat ^ as a single space above. vbcoders.com mangles multiple spaces in submitted text.

Inputs
A string, strText.

Assumes
Doesn't strip tabs, CRLFs or any characters from text EXCEPT char 32.

Returns
A string = strText without spaces and the beginning or end or more than 1 consecutive space within.

Side Effects
None.

Rate Squeeze (2(2 Vote))
Squeeze.bas

Squeeze Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters