tag:blogger.com,1999:blog-4054614406137433263.post7494806107916166722..comments2024-03-25T18:56:05.062-04:00Comments on Metadata Consulting [dot] ca: C# .NET - How to get a string between two strings, minimal spanning, fastmetadataconsulting (profile)http://www.blogger.com/profile/02252886574672860301noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-4054614406137433263.post-13710151178597102882020-09-11T09:31:34.477-04:002020-09-11T09:31:34.477-04:00Thank you Casual Cat!Thank you Casual Cat!metadataconsulting (profile)https://www.blogger.com/profile/02252886574672860301noreply@blogger.comtag:blogger.com,1999:blog-4054614406137433263.post-37668717807340251632020-09-11T09:30:16.052-04:002020-09-11T09:30:16.052-04:00https://adamsitnik.com/Span/ - indepth
https://www...https://adamsitnik.com/Span/ - indepth<br />https://www.codeproject.com/Articles/5269747/Using-Span-T-to-improve-performance-of-Csharp-code<br />https://stackoverflow.com/questions/59596364/obtain-a-spanbyte-over-a-struct-without-making-a-copy-of-the-structmetadataconsulting (profile)https://www.blogger.com/profile/02252886574672860301noreply@blogger.comtag:blogger.com,1999:blog-4054614406137433263.post-22421440634907317972020-09-11T09:11:04.810-04:002020-09-11T09:11:04.810-04:00https://docs.microsoft.com/en-us/dotnet/api/system...https://docs.microsoft.com/en-us/dotnet/api/system.memoryextensions.asspan<br /><br />Available in 5.0 Preview 8.NET Core3.1 3.0 2.2 2.1 metadataconsulting (profile)https://www.blogger.com/profile/02252886574672860301noreply@blogger.comtag:blogger.com,1999:blog-4054614406137433263.post-27369538454162756442020-09-10T13:22:47.625-04:002020-09-10T13:22:47.625-04:00Any call to string.SubString() is a possible code ...Any call to string.SubString() is a possible code smell. It would be better to return a ReadOnlySpan (just replace SubString with AsSpan) and let the caller decide if they want to allocate a new string on the heap or not.Casual Cathttps://www.blogger.com/profile/14749984997759124469noreply@blogger.com