[pshaiCmd] ArrayRemove2

0 860 Views No Comments 4 years ago
  • Simple command to remove value(s) from the array.

    Usage testample:

    local testArr1 = {'a', 'a', 'b', 'c', 'a', 'b'}
    local testArr2 = {1, 2, 1, 4, 7, 1}
    local result1 = CC_ArrayRemove2(testArr1, 'a')
    local result2 = CC_ArrayRemove2(testArr2, 1)
    local result3 = CC_ArrayRemove2(testArr1, 'a', true)
    local result4 = CC_ArrayRemove2(testArr2, 1, true)
    Log(result1) -- missing first 'a'
    Log(result2) -- missing first '1'
    Log(result3) -- missing all 'a'
    Log(result4) -- missing all '1'
    HaasScript Code
    Sign in or Register to download for free
  • Earn Up to $100,000 USDT Promotion Type: contest Expires: June 30, 2024 Exclusive
    Fire up your trade bots and earn up to $100,000 USDT, BitMEX VIP, free subscriptions, and more.
Login or Register to Comment

Unlock your crypto trading potential

Create a free account and enjoy everything we have to offer.

Join for Free