ShaderInterpreter.Converter.EnsureAlphanumeric C# (CSharp) Method

EnsureAlphanumeric() private static method

Ensures the provided name is alphanumeric
private static EnsureAlphanumeric ( string _Name ) : bool
_Name string
return bool
        private static bool EnsureAlphanumeric( string _Name )
        {
            for ( int CharIndex=0; CharIndex < _Name.Length; CharIndex++ )
            {
                char	C = _Name[CharIndex];
                bool	IsAlpha = false;
                IsAlpha |= C >= 'a' && C <= 'z';
                IsAlpha |= C >= 'A' && C <= 'Z';
                IsAlpha |= C >= '0' && C <= '9';
                IsAlpha |= C == '_';
                if ( !IsAlpha )
                    return false;
            }

            return true;
        }