/// <summary> /// <para>Returns a QString initialized with the first size characters of /// the Unicode string unicode (ISO-10646-UTF-16 encoded).</para> /// <para>If size is -1 (default), unicode must be terminated with a /// 0.</para> /// <para>This function checks for a Byte Order Mark (BOM). If it is /// missing, host byte order is assumed.</para> /// <para>This function is slow compared to the other Unicode conversions. /// Use QString(const QChar *, int) or QString(const QChar *) if /// possible.</para> /// <para>QString makes a deep copy of the Unicode data.</para> /// <para>See also utf16() and setUtf16().</para> /// </summary> public static QString FromUtf16(ushort *unicode, int size) { var arg0 = unicode; var __ret = new QtCore.QString.Internal(); Internal.FromUtf16_0(new IntPtr(&__ret), arg0, size); var __instance = Marshal.AllocHGlobal(4); QString.Internal.ctor_5(__instance, new global::System.IntPtr(&__ret)); return(new QString(__instance)); }
/// <summary> /// <para>Returns a QString initialized with the first size characters of /// the Unicode string unicode (ISO-10646-UTF-16 encoded).</para> /// <para>If size is -1 (default), unicode must be terminated with a /// 0.</para> /// <para>This function checks for a Byte Order Mark (BOM). If it is /// missing, host byte order is assumed.</para> /// <para>This function is slow compared to the other Unicode conversions. /// Use QString(const QChar *, int) or QString(const QChar *) if /// possible.</para> /// <para>QString makes a deep copy of the Unicode data.</para> /// <para>See also utf16() and setUtf16().</para> /// </summary> public static QString FromUtf16(ushort* unicode, int size) { var arg0 = unicode; var __ret = new QtCore.QString.Internal(); Internal.FromUtf16_0(new IntPtr(&__ret), arg0, size); var __instance = Marshal.AllocHGlobal(8); QString.Internal.ctor_5(__instance, new global::System.IntPtr(&__ret)); return new QString(__instance); }