List.ReplaceRange

ไวยากรณ์

List.ReplaceRange(list as list, index as number, count as number, replaceWith as list) as list

เกี่ยวกับ

countแทนที่ค่า ใน list ด้วยรายการ replaceWithโดยเริ่มต้นในตําแหน่งindexที่ระบุ

ตัวอย่างที่ 1

แทนที่ {7, 8, 9} ในรายการ {1, 2, 7, 8, 9, 5} ด้วย {3, 4}

การใช้งาน

List.ReplaceRange({1, 2, 7, 8, 9, 5}, 2, 3, {3, 4})

เอาท์พุท

{1, 2, 3, 4, 5}