GDExtensionInterfaceStringNameNewWithLatin1Chars typedef

GDExtensionInterfaceStringNameNewWithLatin1Chars = Pointer<NativeFunction<GDExtensionInterfaceStringNameNewWithLatin1CharsFunction>>

@name string_name_new_with_latin1_chars @since 4.2

Creates a StringName from a Latin-1 encoded C string.

If p_is_static is true, then:

  • The StringName will reuse the p_contents buffer instead of copying it. You must guarantee that the buffer remains valid for the duration of the application (e.g. string literal).
  • You must not call a destructor for this StringName. Incrementing the initial reference once should achieve this.

p_is_static is purely an optimization and can easily introduce undefined behavior if used wrong. In case of doubt, set it to false.

@param r_dest A pointer to uninitialized storage, into which the newly created StringName is constructed. @param p_contents A pointer to a C string (null terminated and Latin-1 or ASCII encoded). @param p_is_static Whether the StringName reuses the buffer directly (see above).

Implementation

typedef GDExtensionInterfaceStringNameNewWithLatin1Chars =
    ffi.Pointer<
      ffi.NativeFunction<
        GDExtensionInterfaceStringNameNewWithLatin1CharsFunction
      >
    >;