/ Published in: C#
Expand |
Embed | Plain Text
public static string StripXML(string source) { int bufferIndex = 0; bool inside = false; for (int i = 0; i < source.Length; i++) { char let = source[i]; if (let == '<') { inside = true; continue; } if (let == '>') { inside = false; continue; } if (!inside) { buffer[bufferIndex] = let; bufferIndex++; } } }
You need to login to post a comment.
