发布:2019/12/26 17:49:42作者:管理员 来源:本站 浏览次数:1088
c# 以换行(\r\n)拆分字符串
字符串数组形式:
string[] striparr = strip.Split(new string[] { "\r\n" }, StringSplitOptions.None);
striparr = striparr.Where(s => !string.IsNullOrEmpty(s)).ToArray();
List<sting>形式:
List<string> striparr = strip.Split(new string[] { "\r\n" }, StringSplitOptions.None).ToList();
striparr = striparr.Where(s => !string.IsNullOrEmpty(s)).ToList();
© Copyright 2014 - 2024 柏港建站平台 ejk5.com. 渝ICP备16000791号-4