Removes duplicate white space, control characters and null from a string.

C# | Visual Basic | Visual C++ |
<ExtensionAttribute> _ Public Shared Function GetValidLabel ( _ value As String _ ) As String
[ExtensionAttribute] public: static String^ GetValidLabel( String^ value )

value with duplicate white space, control characters and nulls removed.

Strings reported from field devices can be full of inconsistencies, this function "cleans-up" the strings for visualization.