System.Extensions.strlen C# (CSharp) Method

strlen() public static method

public static strlen ( this nativeUtf8 ) : int
nativeUtf8 this
return int
        public static int strlen(this IntPtr nativeUtf8)
        {
            int len = 0;
            
            if (nativeUtf8 != IntPtr.Zero)
            {
                while (Marshal.ReadByte(nativeUtf8, len) != 0)
                    ++len;
            }

            return len;
        }