| javascript_core

# Procedural File: Bs_Array.class.js.php Source Location: /core/lang/Bs_Array.class.js.php ## Classes: ## Page Details: this code extends javascripts built in array class. if you include that file, all your arrays immediatly have that functionality. #### Tags:
since: | bs4.2
author: | andrej arn <at blueshoes dot org>
### deleteItem [line 208]
`bool deleteItem( int i)`
removes the item with the given index from the array. shrinks the array by one. all elements after the removed element will move one place down! if you don't want that, use yourArray[i] = null; #### Tags:
return: | true
see: | deleteItemHash()
throws: | bool false
access: | public
#### Parameters
int | i | i
[ Top ] ### deleteItemHash [line 231]
`bool deleteItemHash( mixed key)`
same as deleteItem() but works with hashes. #### Tags:
return: | true
since: | bs4.4
see: | deleteItem()
throws: | bool false
access: | public
[ Top ] ### has [line 190]
`bool has( string str)`
tells if the given str is in the array. we wanted to name this method "in" so you could do myArray.in() but mozilla did not like it, thus renamed to .has() #### Tags:
access: | public
#### Parameters
string | str | str
[ Top ] ### indexOf [line 173]
`int indexOf( string str)`
returns the index position of element str in the vector. #### Tags:
return: | >= 0
throws: | -1
access: | public
#### Parameters
string | str | str
[ Top ] ### moveDown [line 61]
`array moveDown( int key)`
moves the index specified one down in the vector. if the given key is out-of-bounds, the original array is returned. #### Tags:
return: | (the new array)
see: | moveUp()
since: | bs4.4
access: | public
#### Parameters
int | key | key (index)
[ Top ] ### moveToBottom [line 138]
`array moveToBottom( int key)`
moves the index specified to the end of the vector. if the given key is out-of-bounds, the original array is returned. #### Tags:
return: | (the new array)
see: | moveToTop()
since: | bs4.4
access: | public
#### Parameters
int | key | key (index)
[ Top ] ### moveToTop [line 105]
`array moveToTop( int key)`
moves the index specified to the beginning of the vector. if the given key is out-of-bounds, the original array is returned. #### Tags:
return: | (the new array)
see: | moveToBottom()
since: | bs4.4
access: | public
#### Parameters
int | key | key (index)
[ Top ] ### moveUp [line 22]
`array moveUp( int key)`
moves the index specified one up in the vector. if the given key is out-of-bounds, the original array is returned. #### Tags:
return: | (the new array)
see: | moveDown()
since: | bs4.4
access: | public
#### Parameters
int | key | key (index)
[ Top ] Documentation generated on Mon, 29 Dec 2003 22:18:14 +0100 by phpDocumentor 1.2.3