Example #1
0
        //https://msdn.microsoft.com/en-us/library/azure/dd179338.aspx
        public static string CleanStringForTableKey(string text)
        {
            var disallowedChars = new HashSet <char>(new[] { '/', '\\', '#', '?' });

            for (char i = (char)0; i <= 0x1F; i++)
            {
                disallowedChars.Add(i);
            }

            for (char i = (char)0x7F; i <= 0x9F; i++)
            {
                disallowedChars.Add(i);
            }

            return(SiteUtil.CleanString(text, disallowedChars));
        }