Utility function that removes all non-alphanumeric characters from a string and returns just the numbers and letters, permits underscore, and prepends with underscore if the identifier starts with a number. This is used for converting text valid XML tags, for example.
Syntax
'Declaration
Public Shared Function NormalizeIdentifier( _
ByVal As String _
) As String
'Usage
Dim stringIN As String
Dim value As String
value = Utils.NormalizeIdentifier(stringIN)
public static string NormalizeIdentifier(
string
)
public function NormalizeIdentifier(
: String
): String; static;
public static function NormalizeIdentifier(
: String
) : String;
public: static string* NormalizeIdentifier(
string*
)
public:
static String^ NormalizeIdentifier(
String^
)
Parameters
- stringIN
- The string IN.
Return Value
String containing only the alphanumeric characters and underscores from the input string
See Also