Modify

Opened 16 years ago

Closed 14 years ago

#1571 closed Feature Request (Rejected)

StringSplit - Add CaseSense parameter

Reported by: MrCreatoR <mscreator@…> 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 J-Paul Mesnage, 16 years ago

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 J-Paul Mesnage, 16 years ago

Milestone: 3.3.7.0
Owner: set to J-Paul Mesnage
Resolution: Completed
Status: newclosed

Added by revision [5847] in version: 3.3.7.0

comment:3 by J-Paul Mesnage, 15 years ago

Resolution: Completed
Status: closedreopened

comment:4 by TicketCleanup, 15 years ago

Milestone: 3.3.7.0

Automatic ticket cleanup.

comment:5 by trancexx, 14 years ago

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 J-Paul Mesnage.

Add Comment


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