Recently I have been reading up on some of the flaws with the Java substring method – specifically relating to memory, and how java keeps a reference to the original string. Ironically I am also developing a server application that uses C# .Net’s implementation of substring many tens of times in a second. That got me thinking…
- Are there memory issues with the C# (.Net)
string.Substring? - What is the performance like on
string.Substring? Is there a faster way to split a string based on start/end position?
Looking at .NET’s implementation of String.Substring, a substring does not share memory with the original.