FoxProMatt wrote: Let me give a reminder that most (non-dbf related) FoxPro functions were implemented in a C# library way back in June of 2020 a long time ago and the source code is on my GitHub account. It is called "Visual FoxPro Toolkit for .NET". Of course we probably wouldn't want to use these DLLs or the C# code directly, but the code could be helpful in seeing how the VFP functions were implemented in C#.
Chris already pointed out that the implementation of vfp Toolkit is not free of errors.
As he used "my" function pair as example, let me add how I approached implementation:
first I spent about an H behind car steering wheel of a drive back from Munich to get a first idea on problems involved and probably needed additional effort (mostly nodding on unicode and possible string/char/array issues at first to the speedometer).
Only then I looked at the code in the toolkit, but just from reading the code it was clear that it was not free of issues

Still, it verified my basic idea on how to resolve implementation and made me aware of the System:Char:IsWhiteSpace(tc2Check) method, for which I added one of the additional implementation branches. Getting speed of X# near ol' vfp on long test strings involved quite a few tweaks and optimizations, already ballooning code size to a multiple of toolkit size plus solidifying the need to offer a special approach for speed junkies when used in SQL or table usage. Also possible parallel or asynch issues - all of which did not faze vfp, as the option of paralellization, while existing in vfp, is offered only at a much higher level (think COM threads most of the time).
Further benchmarking showed that x# .dbf handling speed back then was not really comparable to vfp speeds, so I did not implement that part back then - might resume if my time permits and x# .dbf handling is in the same ballpark.
So yes, look at that code AFTER thinking on the problems involved, but with distrust, a few basic tests and an eye for runtime optimization.