I'm dealing with a char* in C# code (in an unsafe section). Is there any way to call the strlen function from C#. It goes against all common sense to have to write a custom strlen function to search for the null terminator. Isn't there a way to call strlen from C# or a similar method that I have access to?
In the big picture I'm trying to convert the char* to a string object, but the characters are in ANSCII format, so I'm going to use the .NET Encoding.Convert namespace to convert it. But I need to know the length of the string before I do that.