Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove Spaces (or other characters) from a String
#3
(12-29-2022, 01:36 AM)mnrvovrfc Wrote: Hi George.

Useful function, but you forgot in the example, just below the comment for test #2 to include a period as the value of qstring$.

Good catch! And I thought it worked. Big Grin

Anyway, I tested it again by putting 4 periods in Test #2 and it still worked! Angel

Here is the test output.


Quote:QB64: Test #1 - Remove SPACES from 'New York Yankees
QB64: qString$ = New York Yankees
QB64: retValue$ = NewYorkYankees

QB64: Used in a PRINT stmt, function returns: NewYorkYankees

QB64: Test #2 -Remove SPACES and PERIODS from 'New York Yankees.
QB64: qString$ = New York.Yankees...
QB64: retValue$ = NewYorkYankees

QB64: Used in a PRINT stmt, function returns: NewYork.Yankees...


------------------
(program exited with code: 0)
Press return to continue
—————————————————————————————
George McGinn
Theoretical/Applied Computer Science Specialist
Member: IEEE, IEEE Computer Society
               Technical Council on Software Engineering       
               IEEE Standards Association
               Society of American Baseball Research
Reply


Messages In This Thread
RE: Remove Spaces (or other characters) from a String - by George McGinn - 12-29-2022, 01:54 AM



Users browsing this thread: 1 Guest(s)