Opened 16 years ago
Closed 14 years ago
#1571 closed Feature Request (Rejected)
StringSplit - Add CaseSense parameter
| Reported by: | Owned by: | J-Paul Mesnage | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | Severity: | None | |
| Keywords: | String, Split, Case, Sensitive | Cc: |
Description
This feature request is related to ticket #121.
To avoid a problems with splitting strings by delimiter that might have unknown letters case, the function should recieve an optional parameter $iCaseSense...
StringSplit(string, delimiters [, flags [, casesense]]])
and by default i think it should be not case sensitive, althought it will break the backward compatibility.
Example of this behaviour:
#include <Array.au3>
$aSplit = StringSplit("caBca", "abc", 1) ;Should split into 2 elements: [1] = c, [2] = a
_ArrayDisplay($aSplit)
$aSplit = StringSplit("abCde", "c", 1) ;Should split into 2 elements: [1] = ab, [2] = de
_ArrayDisplay($aSplit)
$aSplit = StringSplit("caBca", "aBc", 1) ;This one splits correctly, because aBc mathes the letters case: [1] = c, [2] = a
_ArrayDisplay($aSplit)
P.S
If this parameter will not be added, then at least the docs should be updated with the info about the fact that StringSplit is case sensitive, and i mean more than just «(case sensitive)» in the parameter description, it is hard to notice this info.
Attachments (0)
Change History (5)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
| Milestone: | → 3.3.7.0 |
|---|---|
| Owner: | set to |
| Resolution: | → Completed |
| Status: | new → closed |
Added by revision [5847] in version: 3.3.7.0
comment:3 by , 15 years ago
| Resolution: | Completed |
|---|---|
| Status: | closed → reopened |
comment:5 by , 14 years ago
| Resolution: | → Rejected |
|---|---|
| Status: | reopened → closed |
Case insensitive split would result in 100 bug reports by users using languages other than English. AutoIt string is not limited to ASCII character set.

as I plan to do the comparison as in StringLower()which is not the same as other Casesense, I prefer to define the insensitivity with the flag = 4.
This flag will need to duplicate the input string which can lead memory big usage.
But for me is better than converting and comparing char by char for flag = 1.