Modify

Opened 11 years ago

Closed 11 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 Changed 11 years ago by guinness

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 Changed 11 years ago by Jon

  • Milestone set to 3.3.9.11
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [8067] in version: 3.3.9.11

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 Jon.
Author


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

 
Note: See TracTickets for help on using tickets.