Modify

Opened 15 years ago

Closed 12 years ago

#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 Changed 14 years ago by Jpm

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 Changed 14 years ago by Jpm

  • Milestone set to 3.3.7.0
  • Owner set to Jpm
  • Resolution set to Completed
  • Status changed from new to closed

Added by revision [5847] in version: 3.3.7.0

comment:3 Changed 13 years ago by Jpm

  • Resolution Completed deleted
  • Status changed from closed to reopened

comment:4 Changed 13 years ago by TicketCleanup

  • Milestone 3.3.7.0 deleted

Automatic ticket cleanup.

comment:5 Changed 12 years ago by trancexx

  • Resolution set to Rejected
  • Status changed from reopened to 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.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jpm.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.