Spec-Zone.ru › ColdFusion

listInsertAt

Inserts an element in a list.

listInsertAt(list, position, value [, delimiters]) → returns string

  • CF
  • Lucee
  • BL 1.0.0+
  • See Also: listGetAt listDeleteAt listSetAt

    Argument Reference

    list string
    Required

    position numeric
    Required

    value string
    Required

    delimiters string
    Default: ,

    Examples
    Sample code invoking the listInsertAt function

    Simple Example

    Inserts 'foo' into the list at position 2

    listInsertAt("bar,lorem,ipsum", 2, "foo")

    Expected Result: bar,foo,lorem,ipsum

    Example with Custom Delimiter

    Inserts 'foo' into the list with a custom delimiter

    listInsertAt("bar|lorem,ipsum|me|something", 2, "foo", "|")

    Expected Result: bar|foo|lorem,ipsum|me|something

    © 2012–present Foundeo, Inc. and the CFDocs contributors.
    Licensed under the MIT License.
    ColdFusion is a trademark of Adobe Systems Incorporated.
    https://cfdocs.org/listinsertat

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API