Exemplo n.º 1
0
        public string Shuffle(string s)
        {
            if (s == null)
            {
                return(null);
            }
            if (s.Length == 1)
            {
                return(s);
            }

            //Move the first character to the end.
            s = s.Substring(1) + s.Substring(0, 1);

            //Reverse the order of the characters.
            s = _stringService.Reverse(s);

            //Write the results to a database table.
            _databaseService.LogResults(s);

            return(s);
        }