redndahead 0 Posted March 11, 2004 I made this one while making my UDFManager. Might be nice to include in the UDF's. The first one really helped me get rid of extensions in an array list of files. expandcollapse popup;=============================================================================== ; ; Description: Trims group of elements in an array a certain amount right. ; Syntax: _TrimArrayRight( $sArray,$nAmount,$nBegin,$nEnd ) ; Parameter(s): $sArray - The array to trim (Array). ; $nAmount - The amount to trim (numeric). ; $nBegin - What element to begin with (numeric). ; $nEnd - What element to end with (numeric). ; Requirement(s): None ; Return Value(s): On Success - Returns the array back with trimed elements. ; On Failure - None ; Author(s): Adam Moore <ane61000@yahoo.com> ; Note(s): None ; ;=============================================================================== Func _TrimArrayRight($a,$b,$c,$d) For $i=$c to $d $a[$i]=StringTrimRight($a[$i],$b) Next Return($a) EndFunc ================================ ; ; Description: Trims group of elements in an array a certain amount left. ; Syntax: _TrimArrayLeft( $sArray,$nAmount,$nBegin,$nEnd ) ; Parameter(s): $sArray - The array to trim (Array). ; $nAmount - The amount to trim (numeric). ; $nBegin - What element to begin with (numeric). ; $nEnd - What element to end with (numeric). ; Requirement(s): None ; Return Value(s): On Success - Returns the array back with trimed elements. ; On Failure - None ; Author(s): Adam Moore <ane61000@yahoo.com> ; Note(s): None ; ;=============================================================================== Func _TrimArrayLeft($a,$b,$c,$d) For $i=$c to $d $a[$i]=StringTrimLeft($a[$i],$b) Next Return($a) EndFunc red Share this post Link to post Share on other sites