diff options
author | Paweł Tomulik <ptomulik@meil.pw.edu.pl> | 2013-07-29 11:30:47 +0200 |
---|---|---|
committer | Paweł Tomulik <ptomulik@meil.pw.edu.pl> | 2013-08-05 22:12:26 +0200 |
commit | 206941520467a5cbf1ba4131c68c4814b5ab181a (patch) | |
tree | 038b83732eea904567b9188d055277475efdfd45 /README.markdown | |
parent | e8dcc691934f11172e2a3b5064a375f6b025865b (diff) |
added delete_values() and delete_undef_values() functions
Diffstat (limited to 'README.markdown')
-rw-r--r-- | README.markdown | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown index 2a1ddfd..1e51e1d 100644 --- a/README.markdown +++ b/README.markdown @@ -204,6 +204,33 @@ Would return: ['a','c'] - *Type*: rvalue +delete_values +------------- +Deletes all instances of a given value from a hash. + +*Examples:* + + delete_values({'a'=>'A','b'=>'B','c'=>'C','B'=>'D'}, 'B') + +Would return: {'a'=>'A','c'=>'C','B'=>'D'} + + +delete_undef_values +------------------- +Deletes all instances of the undef value from an array or hash. + +*Examples:* + + $hash = delete_undef_values({a=>'A', b=>'', c=>undef, d => false}) + +Would return: {a => 'A', b => '', d => false} + + $array = delete_undef_values(['A','',undef,false]) + +Would return: ['A','',false] + +- *Type*: rvalue + difference ---------- This function returns the difference between two arrays. |