Modify

#1571 closed Feature Request (Rejected)

StringSplit - Add CaseSense parameter

Reported by: MrCreatoR <mscreator@…> Owned by: Jpm
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 Jpm, on May 22, 2010 at 4:21:37 PM

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.

comment:2 by Jpm, on May 24, 2010 at 7:22:55 PM

Milestone: 3.3.7.0
Owner: set to Jpm
Resolution: Completed
Status: newclosed

Added by revision [5847] in version: 3.3.7.0

comment:3 by Jpm, on Jun 10, 2011 at 9:35:06 PM

Resolution: Completed
Status: closedreopened

comment:4 by TicketCleanup, on Jun 11, 2011 at 12:00:01 AM

Milestone: 3.3.7.0

Automatic ticket cleanup.

comment:5 by trancexx, on Jul 16, 2012 at 9:53:56 AM

Resolution: Rejected
Status: reopenedclosed

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.

Modify Ticket

Action
as closed The owner will remain Jpm.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.