public virtual bool Parse(string pageUrls) { bool result = true; string[] urls = UStr.Split(pageUrls, Environment.NewLine); foreach (string urlx in urls) { result = ParseUrl(urlx); } return(result); }
private StringBuilder FilterData(UserSession us) { string[] strs = UStr.Split(us.AsyncData.ToString(), "\0", StringSplitOptions.RemoveEmptyEntries); string str = ""; int i = 0; us.AsyncData = new StringBuilder(); bool isValid = true; if (strs.Length > 0) { str = strs[strs.Length - 1]; if (!UData.IsValidXml(str)) { us.AsyncData.Append(str); isValid = false; } if (isValid) { for (i = 0; i < strs.Length; i++) { str = strs[i]; ProcessData(str, us); } } else { for (i = 0; i < strs.Length - 1; i++) { str = strs[i]; ProcessData(str, us); } } } return(us.AsyncData); }
public static int LineCount(string text) { string [] lines = UStr.Split(text, Environment.NewLine); return(lines.Length); }