advertisement

Find Code  Advanced Search   

Free Newsletters:   
browse free vb code
Submit Code
ASP,  HTML, and XML
Database
Dates  and Math
Files  and Directories
Forms  and Controls
Lists,  Collections, and Arrays
Miscellaneous
Multimedia/Games
Office/VBA
Network/Internet
Registry
Screen/Graphics
String  Manipulation
System/API
Windows  2000/XP
VB.NET/ASP.NET



advertisement
Trim all Nonprinting Characters from a String (VB5/VB6/.NET)

Author: Intelligent Solutions Inc. (Featured Developer)
Category: String Manipulation
Type: Snippets
Difficulty: Beginning

Version Compatibility:  Visual Basic 5   Visual Basic 6   Visual Basic.NET  

More information: VB's Trim function only trims space characters (" ") from the beginning or the end of a string. This alternative trims all nonprinting characters (tabs, character returns, etc.)

Small revisions applied 3/31/03 allow function to work correctly in VB.NET as well.

This code has been viewed 111771 times.

Instructions: Copy the declarations and code below and paste directly into your VB project.


Declarations:

Code:

No Text Boxes

Sponsored Links