Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (64 - 66 of 3866)

Ticket Resolution Summary Owner Reporter
#120 Rejected StringSplit limit parameter Paulie
Description

StringSplit("String","delimiters"[, flag [,limit]])

I was wondering how big of a hassle it would be to make StringSplit have an additional optional parameter that would limit the amount of splits. Similar to PHPs "explode"

Example

$String = "Test1|Test2|Test3|Test4"
$Result = StringSplit($String, "|",1,2);<-2 would split to 2 elements (perform 1 split)

$Result[0] = 2 (redundant i suppose :\) $Result[1] = "Test1" $Result[2] = "Test2|Test3|Test4"

Reason

There have been multiple time that I've found myself splitting a long string only to use the first few elements, while it hasn't been a problem to use the current stringsplit for this, it seems like a feature that wouldn't hurt (especially considering it would be an optional param, so no script breaks)

I'm sure it's been considered, but i didn't see it suggested. Thanks.

#122 No Bug StringSplit does not return the string if no split found with separator with multiple characters as individual characters anonymous
Description

StringSplit does not return the string if no split found with separator with multiple characters as individual characters. "Local $arFileF = StringSplit("c", "aBc", 0)" Best, Randall

#123 Rejected I have added two user functions to array.au3 doug@…
Description

Total - returns the total of all values in an array Average - returns the average of all values in an array

Files are included with the additions.

Note: See TracQuery for help on using queries.