Version: dev

remove_coupling

Stable function · Editing

Tier: stable · Kind: function · Topic: Editing

JuliaTypeScriptPythonRustGo
remove_couplingremoveCouplingremove_coupling, remove_coupling_from_fileremove_couplingRemoveCoupling

Note: spelling differs from the §2 rule: python=remove_coupling_from_file (expected remove_coupling); multiple spellings exported by: python

Julia

remove_coupling(file::EsmFile, index::Int64)
remove_coupling(file::EsmFile, index::Int) -> EsmFile

Remove a coupling entry by index (1-based). Throws EditError if the index is out of bounds.

Source

TypeScript

function removeCoupling(file: EsmFile, index: number): EsmFile

Remove a coupling entry from an ESM file by index

Parameters

  • file — ESM file to remove coupling from
  • index — Index of coupling entry to remove

Returns

New ESM file with coupling removed

Throws

  • EntityNotFoundError if index is out of bounds

Source

Python

Exported as remove_coupling and remove_coupling_from_file. Both names refer to the same operation.

remove_coupling

remove_coupling(esm_file: EsmFile, index: int, validate_after_edit: bool = True) -> EditResult

Remove a coupling entry from an ESM file.

Source

remove_coupling_from_file

remove_coupling_from_file(esm_file: EsmFile, index: int, validate_after_edit: bool = True) -> EditResult

Deprecated alias for remove_coupling . Remove a coupling entry from an ESM file.

Source

Rust

pub fn remove_coupling(esm_file: &EsmFile, index: usize) -> EditResult<EsmFile>

Remove a coupling entry from an ESM file by index

Arguments

  • esm_file - The ESM file to modify
  • index - Index of the coupling entry to remove

Returns

  • EditResult<EsmFile> - New ESM file without the coupling entry

Source · Rust docs

Go

func RemoveCoupling(file ESMFile, index int) (ESMFile, error)

RemoveCoupling returns a copy of file without the coupling entry at index. Indices are 0-based.

Returns *EntityNotFoundError when the index is out of range.

Source · Go docs