c#提取

复制代码
 string email = Console.ReadLine();
            int atIndex = email.IndexOf('@');

            string userName = email.Substring(0, atIndex);

            string domainName = email.Substring(atIndex + 1);

            Console.WriteLine(userName);

            Console.WriteLine(domainName);
            Console.ReadKey();
复制代码

 

posted @   尘梦  阅读(165)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示