Modify

Opened 13 years ago

Closed 13 years ago

#2311 closed Bug (Fixed)

Wrong handling of casesense parameter in StringReplace

Reported by: MrCreatoR <mscreator@…> Owned by: Jon
Milestone: 3.3.9.11 Component: AutoIt
Version: 3.3.8.1 Severity: None
Keywords: StringReplace, casesense Cc:

Description

The example bellow shows that casesense parameter in StringReplace not handled properly if we set it as 2:

$sStr = StringReplace('Some Text', 'text', 'data', 0, 2)
ConsoleWrite($sStr & @LF)

the text is not replaced, but the docs states:

2 = not case sensitive, using a basic/faster comparison

BTW, StringInStr works as expected in this case.

Attachments (0)

Change History (2)

comment:1 by guinness, 13 years ago

This demonstrates the difference.

#include <Constants.au3>

; Doesn't work.
StringReplace('$S_OK', '$s_OK', '', Default, $STR_NOCASESENSEBASIC)
MsgBox($MB_SYSTEMMODAL, '', '$s_OK: ' & @extended) ; Returns 0

; Works.
StringReplace('$S_OK', '$s_OK', '', Default, $STR_NOCASESENSE)
MsgBox($MB_SYSTEMMODAL, '', '$s_OK: ' & @extended) ; Returns 1

comment:2 by Jon, 13 years ago

Milestone: 3.3.9.11
Owner: set to Jon
Resolution: Fixed
Status: newclosed

Fixed by revision [8067] in version: 3.3.9.11

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


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