public CString(string str, CEncoding env = CEncoding.Ascii) { Enc = env.ToEncoding(); Str = str; var data = Enc.GetBytes(str + '\0'); Size = data.Length; Alloc(Size); Marshal.Copy(data, 0, Ptr, Size); }
public static int GetStride(this CEncoding self) => self.ToEncoding().GetStride();