女生学VBNET是不是不靠谱啊,求教一个字符分离问题
用户输入一个字符串,有数字啦,汉字啦,字母啦,然后分别输出来,有这么困难么?各路大神求救
[解决办法]
Dim input As String = Console.ReadLine();
Console.WriteLine("数字" + New String(input.Where(Function(x) x >= "0" And x <= "9").ToArray()))
Console.WriteLine("字母" + New String(input.ToLower().Where(Function(x) x >= "a" And x <= "z").ToArray()))
Console.WriteLine("汉字" + New String(input.Where(Function(x) x >= 256).ToArray()))