Update docs to reflect new behavior of delete function taking array in second argument

This commit is contained in:
Travis Fields 2014-12-19 10:41:07 -08:00
parent 69c42b7eef
commit f6e20d2068
2 changed files with 40 additions and 37 deletions

View file

@ -148,7 +148,7 @@ strings; for example, 'hello\n' becomes 'hello'. Requires a single string or arr
*Type*: rvalue
* `delete`: Deletes all instances of a given element from an array, substring from a
string, or key from a hash. For example, `delete(['a','b','c','b'], 'b')` returns ['a','c']; `delete('abracadabra', 'bra')` returns 'acada'. *Type*: rvalue
string, or key from a hash. For example, `delete(['a','b','c','b'], 'b')` returns ['a','c']; `delete('abracadabra', 'bra')` returns 'acada'. `delete({'a' => 1,'b' => 2,'c' => 3},['b','c'])` returns {'a'=> 1} *Type*: rvalue
* `delete_at`: Deletes a determined indexed value from an array. For example, `delete_at(['a','b','c'], 1)` returns ['a','c']. *Type*: rvalue

View file

@ -17,6 +17,9 @@ string, or key from a hash.
delete({'a'=>1,'b'=>2,'c'=>3}, 'b')
Would return: {'a'=>1,'c'=>3}
delete({'a'=>1,'b'=>2,'c'=>3}, ['b','c'])
Would return: {'a'=>1}
delete('abracadabra', 'bra')
Would return: 'acada'
EOS