redndahead Posted March 11, 2004 Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now