Modify

Opened 14 years ago

Closed 13 years ago

#2210 closed Bug (No Bug)

StringInStr

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.3.9.4 Severity: None
Keywords: Cc:

Description

The below code returns the position of the string, but I think it shouldn't, because the string should be only searched in the last two charakters.

MsgBox(0,"",StringInStr("abcd", "bc", 0, -1, 4, 2))

When seaching from the beginning it works ok, doesn't return the position.

MsgBox(0,"",StringInStr("abcd", "bc", 0, 1, 1, 2))

Attachments (0)

Change History (4)

comment:1 by Jon, 13 years ago

Resolution: Rejected
Status: newclosed

comment:2 by J-Paul Mesnage, 13 years ago

In fact there is no bug.
StringInStr is designed to return the position in the string whatever serching from right.
the first must return 2
and the second as it is scanning only on the 2 first char is not found and return 0 mean not found

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

Resolution: Rejected
Status: closedreopened

comment:4 by J-Paul Mesnage, 13 years ago

Resolution: No Bug
Status: reopenedclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


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