[#BloombergLP-bslalg-BidirectionalLinkListUtil-spliceListBeforeTarget] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/BidirectionalLinkListUtil.adoc[BidirectionalLinkListUtil]::spliceListBeforeTarget :relfileprefix: ../../../ :mrdocs: Unlink and move (splice) the elements of a doubly‐linked list included in the closed range `[first, last]` out of their original list and into another doubly‐linked list before the specified `target` node. If `target` is 0, then the elements are extracted and form a new list such that `0 == first‐>previousLink()` and `0 == last‐>nextLink()`. After successful execution of this function the values of the `previousLink` and `nextLink` attributes of all the links in the origin and destination lists appropriately reflect the operation. The behavior is undefined unless both `first` and `last` are non‐zero members of the same linked list; `first` precedes `last` in the list, or `first == last`; `target` is not a node contained in the closed range `[first, last]`; and `isWellFormed(first, last)` is true. == Synopsis Declared in `<bslalg_bidirectionallinklistutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void spliceListBeforeTarget( xref:BloombergLP/bslalg/BidirectionalLink.adoc[BidirectionalLink]* first, xref:BloombergLP/bslalg/BidirectionalLink.adoc[BidirectionalLink]* last, xref:BloombergLP/bslalg/BidirectionalLink.adoc[BidirectionalLink]* target); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#